John Goerzen: How to get started programming?
I have been asked for advice from several people recently on how to get started programming, or how to further develop a nascent interest in coding or software engineering. The people asking the questions range in age from about 10 years old to older than me. These are people that, for various reasons, are not very easily able to take computer science courses right now.
One would think that, since I ve been doing this for somewhere around a quarter century (oh I do feel old now), that I d be ready to offer up some great advice. And offer some suggestions I have. But I m not convinced they re good ones.
I have two main tensions. The first is that I, like many in the communities I tend to hang out in such as Debian s, have a personality that leads me to take a deep dive into details of anything that holds my interest. Whether it s Linux, Haskell, or amateur radio, I want to do more than skim the surface if I m having fun with it. Many people are not like that. They may have a lot of fun programming in Visual Basic, not really caring that other languages are out there. Or some people are not like this yet. I feel unqualified to provide good advice to people that are different from me in that way. To put it a different way: most people don t want to wait 4 years to be useful, and want to start out right away and get better over time (and I was the same way too.)
The second is related. I learned programming at a time when, other than BASIC, interpreted languages were not really available to me. (Yes, they were available, but not to me.) I cut my teeth on BASIC, Pascal, and C. Although I rarely use C anymore, I can still drop into it at a moment s notice and be perfectly comfortable. I feel it was a fundamentally valuable experience, and that it would be very hard to become a great programmer without ever having lived and breathed something like C, where memory and pointers must be managed manually. Having said that, it is probably possible to become a good coder without ever having touched C.
Here, then, is an edited version of some rambly advice I sent to someone recently, where learning OOP was particularly mentioned. I would welcome your comments and suggestions. I may point people that ask to this post in the future.
For simply learning how to write code, Dive Into Python has long been a decent resource, though it may assume more experience than some have. I haven t read them myself, but I ve also heard good things about the How to Think Like a Computer Scientist series from Green Tea Press. They re all available as free PDF downloads, too!
Eric S. Raymond s The Art of Unix Programming is another work I ve heard good things about, despite having never read it myself. A quick glance at the table of contents makes me think that even if people don t wind up working on Unix, the lessons and philosophy should be informative.
It seems that many Computer Science programs are using Java for the core of their instruction, or even almost exclusively. Whether that is good or bad, I m not completely sure. It certainly gets people into OOP more deeply, but I m a right tool for the job kind of person. Despite the hype, OO like everything else isn t the right tool for every job.
It is fine for people to dive straight into OO and become good programmers/engineers. However, I think it would be difficult to become a great programmer/engineer without ever having a solid understanding of a more low-level language, such as C in particular. I did my CS work when it was mostly based in C, and am glad for it. If someone never has to manage memory or pointers, I suspect they will be at a disadvantage in the long run for not being able to understand or work with the system at a more fundamental level. If a person knows C, plus some concepts of OO and Functional Programming (FP), it should be easy to pick up just about any other language out there.
I used to think Python was a great first language, but during the 2.x series they added so much fluff and so many special cases that I m less enthusiastic now, though I don t know how much of that got cleaned up in 3.x. I am not too keen on Java as a first language, because too many things that should be simple aren t. I have a fondness for Haskell, and its close relationship to mathematics could make it a great first language or maybe a poor one, depending on your perspective.
One other thing I think it s important for good programmers to have experience with all three major models of programming (procedural, OO, functional.) Even if a person winds up working mostly in one universe, knowledge of and experience with the others is important and informative and, in my experience, leads to better algorithms and architecture all around.
- Procedural languages: Obviously C, but also Unix shell
- OO languages: Python, Java, plenty of other fine choices
- Functional: Lisp, Scheme, Haskell (also the only lazy and pure language on this list) Having said all that, more important than a choice of book or language is experience. I have heard people suggest that it takes 10,000 hours of practice to become a superstar at something, whatever that something is, and I wouldn t doubt it. Seth Godin discusses that a bit, with some criticism of the idea too. So that leads to the most important piece of advice: dive in to whatever your interest is. Experiment, write code, put theory into practice in a way that holds interest and excitement. People that try to do things they don t enjoy don t seem to stick with them as long or execute as well, and thus will never become great.
Third day of GUADEC already. And in Coru a!



As I


Last day of
For the last months, I've been working on a metering project for
I did
The brief outage was due to a scheduled move of the servers to a separate rack and subnet dedicated to our work with the Center for Information Assurance & Cybersecurity (ciac) at the University of Washington Bothell (uwb), and a11y.com
I am currently exercising the new (to us) equipment and hope to winnow the less than awesome equipment over the next quarter. I spent the last six months finding the best in breed of the surplussed DL385 and DL380 chassis we (work) were going to have recycled. The team and I were able to find enough equipment to bring up one of each with eight and six gigs of memory, respectively. These will make excellent hypervisors for provisioning embedded instances of Slackware, Fedora, RHEL, CentOS, Debian, FreeBSD, OpenSolaris, OpenIndiana, FreeDOS, etc.
When I initially configured this xen paravirt environment, I failed to plan for integration with libvirt, so I am now re-jiggering the software bridges so that they are managed using virt-manager. My experience doing this in the Eastsound lab has proved to be quite rewarding. Once network, storage and memory allocation are handled by libvirt, it will be trivial to automate the process of deploying, reclaiming, and managing these Telecommunications Resources efficiently and effectively using Perl.
The new equipment we racked over the last weekend all has hardware assisted virtualization and is capable of hosting operating systems which have not been patched to communicate with the host hypervisor. This provides a higher level of assurance that guests will receive the full amount of provisioned resources and reduces the likelihood of resource conflicts, should the cluster operations team mistakenly over-commit. It also makes it possible for these nodes to host Windows-based operating systems. Oh, and they will also host these not insignificant things called BIG-IP Local Traffic Manager Virtual Edition (VE) and BIG-IP
Playing around with LLC controls on Sandybridge today.
What I wanted to know was how caching backbuffers affects application
performance. The reason for this question is that when the driver uses
page flipping to display a new frame, we force the new scanout buffer
to be uncached because the display hardware only scans out from main
memory. However, when we go back to using this buffer as the next
back-buffer, we don t turn the caching bits back on as that requires
writing GTT entries to change caching modes.
This means that swapping via page-flipping and swapping via copying
has a large change in main memory access patterns during rendering
page flipping applications use an uncached back buffer while copying
applications use a cached back buffer.
What effect does the back-buffer caching-mode have on application
performance?
The changes
In the kernel, I have three modes
1) Existing code. Set buffer objects to cache mode none when
preparing them as scanout buffers. The first time the application
flips to a back buffer, caching is disabled on that buffer forever
2) Flip back and forth. Set buffers to cache mode none when used
as scanout. When that stops, flip them back to cache mode llc.
This involves a whole lot of clflushing and GTT rewriting, obviously.
3) Flush to memory, but don t disable caching. In this mode, the
buffer gets flushed (from both CPU and GPU) before being used as a
scanout, but the cache mode isn t changed.
Benchmarking with glxgears
The first test was pretty simple I hacked up glxgears (yes,
glxgears is not a benchmark) to redraw the same frame multiple times
(including the clear) per swap to provide a scalable amount of
work per swap. No pixel operations, so this is just writing to the
back buffer. Thes numbers are the median of 5 runs, except for those
obviously limited by the refresh rate.
After seeing 
With L szl B sz rm nyi we adopted
I was invited onto NPR in Boston this week for a segment on