Tuesday, November 9, 2010

About C / C++ / C#: Hacking Software for a living

If you can't see this email, click here

About.com

C / C++ / C#

Fundamentals

Tips & Tools

Going Pro



From David Bolton, your Guide to C / C++ / C#
I'm lucky in a way that where I work is untraditional in the way software is requested and produced. Formal? Ha! Requirements capture is asking traders what they want and coming up with code changes or enhancements as quickly as possible. Then testing it so it doesn't break the system and releasing it into production at the weekend when nobody is trading and it's safe to test. Plus a bit of finger crossing on a Monday morning. It's a fun environment to work in but don't tell anyone! Thats how the software that handles billions of dollars of oil trades is made and it works pretty well See you soon...

The Lil Programming Language
C can and is often used to implement compilers and interpreters for other programming languages. Personally I think C# and C++ are a little better because their string handling is both safer and superior but that's only part of the compilation process. Back before I did games I took an interest in compilers and even produced a Basic compiler in 1983 for the CBM-64. LIL (Little Interpreted Language) is a dynamic scripting library written by Kostas Michalopoulos in just two files. Part of it is written in C99 but fear not Microsoft Visual C++ users, there is a stdint.h you can use. There are several example files and the readme file contains a language reference as well as instructions on how to interface it with your C programs. It's a nice piece of work.

Parallelization and Cilk/Cilk Plusâ,,¢
A big problem in computing is how the main programming languages can support multi-cores. If you have 8 cores then shouldn't your heavy computation program be able to run up to eight times faster? In theory maybe, but in practice not without a lot of hard work. Since 1994 there has a project called Cilk (not Clik!) to try and identify elements that can be run in parallel and let a run-time scheduler decide when to run them, not the programmer. Cilk was implemented for C and the source code plus documentation is still available on MIT's website. A spin off project Cilk Arts to develop Cilk++ was acquired by Intel in 2009 who are now releasing a spec for Cilk Plus™. It can be used by itself or in conjunction with TBB CilkPlus™ adds just three new words to the C++ language, they are
  • _Cilk_sync
  • _Cilk_spawn
  • _Cilk_for
The idea is that blocks of code are identified through the use of these words so that at run-time, if there are cores spare then the code can be run in parallel. However this isn't something that you can add to your programs just now unless you use the Intel commercial C++ compiler. Intel have recently released the spec for other compiler writers to take up if they choose.

Yocto - Open Source Embedded Linux Development
Yocto is an SI prefix meaning 10e-24. It's also an Intel sponsored with the Linux foundation initiative to sort out the development process in creating Embedded Linux, currently for these four processors: The project currently targets four architectures: ARM, MIPS, PowerPC and x86 (32 and 64 Bit). However it's an open source project based on PokyLinux. With very inexpensive CPus and boards now widely available, Yocto is intended to help promote the idea of a common embedded Linux. It may not win the battle for the desktop but small Linux powered gadgets are with us now and will only increase in number, so this helps that takeup. To get started you will need a current Linux distribution plus the right packages and a release of the Yocto project. The first time you build it will take a few hours and requires at least 50 Gb of disk space! After you've got your disk images you can then start developing applications for your embedded device that you test on the QEMU emulator.

Development Projects from Initial Design to Completed Code
Each project is a complete application with notes on the requirements, the design, the architecture, code and final project review. With full source code in C, C++ or C#.

 


C / C++ / C# Ads
Featured Articles
Reviews of Software - Tools, Compilers, Editors etc
Book Reviews
Top Tools, Utilities and Resources
Glossary of Programming Terms
Welcome to the C++ Area with Articles about C++ Development
Other Blogs You might find Interesting

 

More from About.com

Is it a Cold or the Flu?
Knowing whether you have a cold or the flu can help you treat your symptoms more effectively. More >



Concerned About Your Drinking?
This short quiz can help you identify whether or not you have a drinking problem. Take the quiz now >




This newsletter is written by:
David Bolton
C / C++ / C# Guide
Email Me | My Blog | My Forum
 
Sign up for more free newsletters on your favorite topics
You are receiving this newsletter because you subscribed to the About C / C++ / C# newsletter. If you wish to change your email address or unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 


Must Reads
Programming Challenges
About C, C++ and C#
C++ for Beginners
C++ Programming
Intro to OOP

Advertisement

No comments: