Learn to program with open source
Posted on 27 Apr 2010 at 14:43
Simon Brock guides you to the best open-source resources to learn programming
What about frameworks?
While a program that prints “Hello world” on the command line may be the quickest to write, all the applications that I spend my days writing open their own windows, and the leap from terminal programming to windows programming has always been hard to make.
To make it easier we have programming frameworks, which are kits of prefabricated window parts. If you know how to lay bricks you could build a house – you might need some design help from an architect and some bricklaying skills to ensure all the walls stay upright. An alternative is to buy prefabricated sections – walls, roofs, doors, windows – and assemble them into a house. It will almost certainly be quicker, but all your houses will look the same, and it won’t work for a fancy garden wall, where you’d still need a bricklayer.
Frameworks are just like that, and there are many examples for almost every language, especially for Java and other web-based languages. One I’ve often mentioned in this column is Ruby on Rails, a framework based on Ruby, but there are equally well-known ones for PHP, such as Cake and Zend. Using a framework can be helpful, and addictive, but using pre-fabricated parts may not give you exactly what you want under all circumstances.
Nevertheless, they can provide a great way into programming, because all the tricky bits you don’t want to face immediately have been done by someone else (and hopefully, they did them right). A good approach might be to learn to create iPhone apps using a web app toolkit, which enables you to create something tangible you can see immediately in the iPhone simulator, which unfortunately only works on the Mac.
Integrated Development Environments
To write real commercial programs you’ll want to use an IDE that combines an editor, a way to insert parts from a framework, and debugging tools under a single interface. Once upon a time simple IDEs existed, but if you look at today’s most popular offerings, such as Eclipse and Xcode, they’re anything but, and learning them is almost as lengthy as learning the language. There’s demand for a cut-down IDE that can be used along with an open-source book and a compiler to learn programming, but as far as I know it doesn’t exist.
The best you can manage today is a smart programmers’ editor that supports syntax colouring and lets you run your program code from inside it – jEdit, SciTE and Notepad++ are open-source examples available for Windows, Linux and Mac. Some of these can take you to the source line of an error, although that’s the limit of their debugging help.
There’s a huge amount of open-source resources on the web to help you learn to write programs, and hopefully I’ve steered you toward joining the next generation of open-source programmers.
Ooops!
error in link behind Freetechbooks.com: http://www.www.freetechbooks.com/
By lellis316 on 29 Apr 2010 ![]()
I agree on PHP
PHP should be banned, without doubt. I've even removed it from my servers and refuse to use it on my main production box.
I think C is a good beginner language. Yes, it is very easy for people to make mistakes with it, but questions like "why does infinite recursion crash my program" bring you on to OS topics like the stack. How to dynamically allocate memory brings you on to the heap. How might you attack this application brings you on to ASLR, bad mem alloc etc. How do you run more than one application at once brings you on to scheduling. Shared libraries, linking etc bring you on to compilers, code re-use, memory and more.
Pointers are really interesting and truly explain the value of a linked list.
Furthermore, you can disassemble your C and take a look at assembly, CPU instructions, system calls...
By contrast, other languages only teach you abstract concepts. Whilst these are good to know and infinitely more practical, everyone writing code should understand they're doing so at a level of abstraction from the system.
By Ninefingers on 29 Jun 2010 ![]()
Simon Brock
Simon runs UK-based Wide Area Communications, the company behind websites such as The Spectator. He's a contributing editor to PC Pro and a fervent believer in open-source technologies..
advertisement
- How to fix Facebook: Social Fixer
- Taking the stress out of WordPress updates
- Where to download free web fonts
- Turn your tablet into a Sky+ remote control
- How to measure the success of a new IT system
- Three years on: the state of the tablet market
- Windows 8: what works and what doesn't
- Yes, I write down my passwords
- How to make money from apps
- Hack your own radio transmitter
- Hands on with the new Google Maps
- Nokia Lumia 925 review: first look
- Why I won't subscribe to Creative Cloud
- GoPro camera strapped to a remote-control helicopter: the ultimate boy's toy
- Acer Iconia A1 review: first look
- Acer Aspire P3 review: first look
- Acer Aspire R7 review: first look
- How we produce the PC Pro podcast
- Google Now draining iPhone battery
- The government website that doesn't work with IE, Chrome, Firefox, Safari, Macs or smartphones
- Dell profits slide 79% amid buyout talks
- Forget cloud subscriptions: users prefer standard licences
- McAfee: cloud storage could help spread viruses
- Analysts question Windows 8 as UK PC shipments slump
- Google pools storage across Gmail and Drive
- Ofcom accused of killing off VoIP competition
- ShoreTel dock turns iPhones and iPads into desk phones
- Bill Gates says iPad users "frustrated"
- Intel Silvermont promises three-fold boost for tablets
- Customers fume as BT introduces IP sharing
advertisement
