Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  How I Program Stuff

I love programming. I can truly say that of all the things I enjoy, I enjoy programming the most. There's nothing quite like the feeling you get when you create something. Writing code is a lot like building your own little universe.When you build stuff, you're in complete control, and, no matter how hard you fight it, your code directly reflects yourself. If you write sloppy code, I can almost guarantee you'll be a sloppy person. If you haphazardly throw code around with any care or passion, it's likely you treat yourself the same way.I tend to think of myself as a passionate programmer ...

2,782 0       PROGRAMMING STEPS ISOLATE ELIMINATE


   Python – parallelizing CPU-bound tasks with multiprocessing

In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads.First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization – breaking a number to its prime factors. Here is a very naive and un-optimized function that take...

3,768 0       PYTHON MULTITASKING MULTIPROCESSING CPU BOUND


  Will We Need Teachers Or Algorithms?

Editor’s note: This is Part III of a guest post written by legendary Silicon Valley investor Vinod Khosla, the founder of Khosla Ventures. In Part I, he laid the groundwork by describing how artificial intelligence is a combination of human and computer capabilities In Part II, he discussed how software and mobile technologies can augment and even replace doctors. Now, in Part III, he talks about how technology will sweep through education.In my last post, I argued that software will take over many of the tasks doctors do today. And what of education? ...

2,085 0       TEACHER ALGORITHM DEVELOPMENT


  Hey kids, just say NO to programming !

Cory Doctorow's latest talk 'The Coming War on General Purpose Computing' really puts things in perspective about life in the 21st century. This got me thinking more about functional programming languages and how they are related to the intentional limitation/crippling of turing machines by industry and government.What if Stallman is right about the intentional efforts to limit freedom of information ? What if it's even worse than we all think it is ?In relation to functional languages : might industry and academia intentionally not want them to become popular ? At least not yet ?Might powerfu...

2,509 0       PROGRAMMING FACTOR VIEW KIDS NO


  Week 1 : Research - Elements of Successful iPhone Games.

This weekend I started work on my first full blown game for the iPhone. I’m not ready to share the details of what the game will be specifically as I’m sure these will change dramatically over the coming weeks. All I’m sure on is it will be a platform game built with Corona SDK.To get me started I’ve been downloading a bunch of games from the app store, jotting down some of the areas contributing to their addictiveness and success.Short levelsI do most of my game playing in short burst. This may be during a short train journey into town, or a few minutes while my di...

2,301 0       MOBILE IPHONE GAME DESIGN FACORS


  PHP to Objective C, where the f**k are parameters?

Javascript, PHP, Ruby functionsI assume you are very familiar with declaring functions in any of the languages above, if not, you should not be reading this. Let’s begin with a simple function to send email in these languages:// PHP or Javascriptdo_send_email (recipient, cc, subject, body);// Rubydo_send_email (recipient, cc, subject, body)So it’s clear by looking at the function’s signature that it takes 4 parameters and they could be optional, depends on your implementation. Even if you missed one parameter, in most cases it is fine, no complain, no fatal error.First enc...

3,822 0       PHP JAVASCRIPT PARAMETER OBJECTIVE-C FUNCTION NAME


  Useful Bash Scripts

Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It's possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. Use set -u How often have you written a script that broke because a variable wasn't set? I know I have, many ti...

8,651 0       LINUX COMMAND SHELL BASH ROBUST


  When to use STDERR instead of STDOUT

Every process is initialized with three open file descriptors, stdin, stdout, and stderr. stdin is an abstraction for accepting input (from the keyboard or from pipes) and stdout is an abstraction for giving output (to a file, to a pipe, to a console).That's a very simplified explanation but true nonetheless. Those three file descriptors are collectively called 'The Standard Streams'.Where does stderr come from?It's fairly straightforward to understand why stdin and stdout exist, however stderr seems like the odd one out. Why do we need another stream for errors?This is a quote from Doug McIll...

5,200 0       DIFFERENCE UNIX STDERR STDOUT