Sunday, 28 October 2012

API - Application Programming Interface

The API is a term I have seen and heard a million times throughout my travels into the world of computer science and I always had a vague idea of its definition. I understood it mostly to be a kind of go-between for the user and a specific type of program.

 Turns out I wasn't too far from the truth, an article I was recently reading summarised what the API is really well so I thought I'd share it with you.

 Essentially the API is a set of pre-defined rules that programmers have to follow if they want their code to work on a certain application. For instance if you were on the web and you wanted to view a PDF file, you would have to have a 'plugin' that allows you to read PDFs within that browser. The programmer constructing that plugin however would of had to adhere to the rules set by that browser's API to create that functioning plugin.

 APIs are literally everywhere, if you're using Windows right now you may notice how, in all the menus and boxes that come up the style of these interfaces are pretty much the same and that is due to the fact that Windows itself has a general API and again programmers wanting to create programs within windows will have to adhere to the pre-defined rules of that API, making all programs developed under that API have a similar feel.





 So the next time you are considering writing code make sure you are aware of the API for the particular system you are trying to manipulate.

Wednesday, 24 October 2012

To Catch A Shooting Star

As I am starting to get back into computing after my break with it to learn about and solidfy personal discipline I came across an article that clarified something that used to puzzle me so much when 'playing around' with coding.

 I always struggled with the fact that once a process produced its outcome, say 5+5, the answer would be produced and the program would either close or go onto its next process seemingly destroying the outcome of the previous process. Well it turns out this is to do with the fact that computers only do what they are told and if you told them to add '5+5', that's exactly what they are going to do. You didn't ask them to save that outcome so they obviously are not going to do that for you. What you have to do however is 'Catch a Shooting Star'. The shooting Star in this instance being the outcome from the process that is going to blink up on your screen then just disappear. To save this shooting star you have to hold on to it, hold on to it by storing it as a Variable. 

 Hopefully this produced one of those 'ohhhhhh yeah, of course' moments to you as it did me'. Knowing that if I want anything to continue existing in computing it has to be stored makes a huge difference to the way I view programming and I am feeling far more confident about not being confused about why my 'programs' would just blink up and then disappear. One thing that still puzzles me however is where does that '25' (from the '5+5' example) go, is it just erased?, was it ever stored?. 









 Anyway I hope this provides a little bit more clarity to understanding programming as it did for me.


Tuesday, 23 October 2012

Facebook Group for all self-teachers

There has been talk for quite a while discussing the need for a centralized group where everyone who wants to get involved in the process of teaching yourself computer science can meet and discuss progress, tips and tricks etc..

 So I took the liberty of setting up a quick Facebook group that serves that very function.




 Join up, post articles, suggestions, wisdom.

 Share the wealth.


o O o
o o O
OOO