kottke.org posts about programming
Lauren Ipsum is a book about computer science for kids (age 10 and up) published by No Starch Press.
Meet Lauren, an adventurer who knows all about solving problems. But she’s lost in the fantastical world of Userland, where mail is delivered by daemons and packs of wild jargon roam.
Lauren sets out for home, traveling through a journey of puzzles, from the Push and Pop Cafe to the Garden of the Forking Paths. As she discovers the secrets of Userland, Lauren learns about computer science without even realizing it-and so do you!
Sounds intriguing. And 1000 bonus points for making the protagonist a girl. There’s an older self-published version of the book that’s been out for a couple of years. I like the older description slightly better:
Laurie is lost in Userland. She knows where she is, or where she’s going, but maybe not at the same time. The only way out is through Jargon-infested swamps, gates guarded by perfect logic, and the perils of breakfast time at the Philosopher’s Diner. With just her wits and the help of a lizard who thinks he’s a dinosaur, Laurie has to find her own way home.
Lauren Ipsum is a children’s story about computer science. In 20 chapters she encounters dozens of ideas from timing attacks to algorithm design, the subtle power of names, and how to get a fair flip out of even the most unfair coin.
Has anyone read it?
You can now program by tweeting snippets of Wolfram Language code to their Tweet-a-Program bot, @WolframTaP. To test it out, I tweeted:
And got back:
Cool!
David Auerbach writes about the high you get from coding.
These days I write more than I code, but one of the things I miss about programming is the coder’s high: those times when, for hours on end, I would lock my vision straight at the computer screen, trance out, and become a human-machine hybrid zipping through the virtual architecture that my co-workers and I were building. Hunger, thirst, sleepiness, and even pain all faded away while I was staring at the screen, thinking and typing, until I’d reach the point of exhaustion and it would come crashing down on me.
It was good for me, too. Coding had a smoothing, calming effect on my psyche, what I imagine meditation does to you if you master it.
Auerbach asserts that there’s something different about the flow state one enters while programming, compared to those brought on by making art, writing, etc. Over the years, I’ve written, designed, and programmed for a living, and programming is, by far, the thing that gets me the best high. I’ve definitely had productive multi-hour Photoshop and writing benders, but coding blocks out the world and the rest of myself like nothing else. In attempting to articulate to friends why I enjoy programming more than design or writing, I’ve been explaining it like this: for me, the coding process is all or nothing and has a definitive end.
When code doesn’t work within the specifications, it’s 100% broken. It won’t compile, the web server throws an error, or gives the wrong output. Writing and design almost always sorta work…even a first draft or an initial design communicates something to the reader/viewer. When the code works within the specifications, it’s done. The writing or design process is never done; even a great piece of writing or the best design can be improved incrementally or even scrapped altogether to go in a different and potentially more fruitful direction. Maybe, for me, programming’s definite ending is what makes it so enjoyable. The flow state comes from knowing that, while the journey is difficult and maddening and messily creative (just as with writing or design), there’s a definite point at which it’s done and you can move on to the next challenge. (via 5 intriguing things)
It’s possible to make a .zip file that contains itself infinitely many times. So a 440 byte file could conceivably be expanded into eleventy dickety two zootayunafliptobytes of data and beyond. Here’s the full explanation.
Programming sorting techniques visualized through Eastern European folk dancing. For instance, here’s the bubble sort with Hungarian dancing:
See also sorting algorithms visualized. (via @viljavarasto)
Stephen Wolfram (of Mathematica and A New Kind of Science fame) says the upcoming Wolfram Language is his company’s “most important technology project yet”.
We call it the Wolfram Language because it is a language. But it’s a new and different kind of language. It’s a general-purpose knowledge-based language. That covers all forms of computing, in a new way.
There are plenty of existing general-purpose computer languages. But their vision is very different — and in a sense much more modest — than the Wolfram Language. They concentrate on managing the structure of programs, keeping the language itself small in scope, and relying on a web of external libraries for additional functionality. In the Wolfram Language my concept from the very beginning has been to create a single tightly integrated system in which as much as possible is included right in the language itself.
The demo video is a little mind-melting in parts:
Not sure if this will take off or not, but the idea behind it all is worth exploring.
This video visualization of 15 different sorting algorithms is mesmerizing. (Don’t forget the sound.)
An explanation of the process. You can play with several different kinds of sorts here.
Black Perl is a poem written in valid Perl 3 code:
BEFOREHAND: close door, each window & exit; wait until time.
open spellbook, study, read (scan, select, tell us);
write it, print the hex while each watches,
reverse its length, write again;
kill spiders, pop them, chop, split, kill them.
unlink arms, shift, wait & listen (listening, wait),
sort the flock (then, warn the "goats" & kill the "sheep");
kill them, dump qualms, shift moralities,
values aside, each one;
die sheep! die to reverse the system
you accept (reject, respect);
next step,
kill the next sacrifice, each sacrifice,
wait, redo ritual until "all the spirits are pleased";
do it ("as they say").
do it(*everyone***must***participate***in***forbidden**s*e*x*).
return last victim; package body;
exit crypt (time, times & "half a time") & close it,
select (quickly) & warn your next victim;
AFTERWORDS: tell nobody.
wait, wait until time;
wait until next year, next decade;
sleep, sleep, die yourself,
die at last
# Larry Wall
It’s not Shakespeare, but it’s not bad for executable code.
This is a surprisingly helpful activity for learning about regular expressions. (via @bdeskin)
From Stack Overflow, a question about how to efficient sort a pile of socks.
Yesterday I was pairing the socks from the clean laundry, and figured out the way I was doing it is not very efficient. I was doing a naive search — picking one sock and “iterating” the pile in order to find its pair. This requires iterating over n/2 * n/4 = n^2/8 socks on average.
As a computer scientist I was thinking what I could do? sorting (according to size/color/…) of course came into mind to achieve O(NlogN) solution.
And everyone gets it wrong. The correct answer is actually:
1) Throw all your socks out.
2) Go to Uniqlo and buy 15 identical pairs of black socks.
3) When you want to wear socks, pick any two out of the drawer.
4) When you notice your socks are wearing out, goto step 1.
QED
An extensive collection gathered from all over the internet of the source code and documentation for NASA’s Apollo and Gemini programs. Here’s part of the source code for Apollo 11’s guidance computer.
And here’s an interesting tidbit about the core rope memory used for the Apollo’s guidance computer:
Fun fact: the actual programs in the spacecraft were stored in core rope memory, an ancient memory technology made by (literally) weaving a fabric/rope, where the bits were physical rings of ferrite material.
“Core” memory is resistant to cosmic rays. The state of a core bit will not change when bombarded by radiation in Outer Space. Can’t say the same of solid state memory.
Woven memory! Also called LOL memory:
Software written by MIT programmers was woven into core rope memory by female workers in factories. Some programmers nicknamed the finished product LOL memory, for Little Old Lady memory.
For her yearly month-long project at Slate, Annie Lowrey wanted to learn how to code. She picked Ruby and became interested in the story of _why, the mysterious Ruby hacker who disappeared suddenly in 2009. In a long article at Slate, Lowrey shares her experience learning to program and, oh, by the way, tracks down _why. Sort of.
The pickaxe book first shows you how to install Ruby on your computer. (That leads to a strange ontological question: Is a programming language a program? Basically, yes. You can download it from the Internet so that your computer will know how to speak it.)
Then the pickaxe book moves on to stuff like this: “Ruby is a genuine object-oriented language. Everything you manipulate is an object, and the results of those manipulations are themselves objects. However, many languages make the same claim, and their users often have a different interpretation of what object-oriented means and a different terminology for the concepts they employ.”
Programming manual, or Derrida? As I pressed on, it got little better. Nearly every page required aggressive Googling, followed by dull confusion. The vocabulary alone proved huge and complex. Strings! Arrays! Objects! Variables! Interactive shells! I kind of got it, I would promise myself. But the next morning, I had retained nothing. Ruby remained little more than Greek to me.
Very much trying not to read the entirety of this beginner’s guide to developing iOS apps published by Apple because then I’ll be tempted to actually make one.
Codify is an iPad app that allows you to code iPad games on your iPad.
We think Codify is the most beautiful code editor you’ll use, and it’s easy. Codify is designed to let you touch your code. Want to change a number? Just tap and drag it. How about a color, or an image? Tapping will bring up visual editors that let you choose exactly what you want.
Codify is built on the Lua programming language. A simple, elegant language that doesn’t rely too much on symbols — a perfect match for iPad.
(via df)
Sort of a nerdy version of Texts From Last Night, Commit Logs From Last Night chronicles the often frustrating process of committing working code.
SUPER ugly, but it works
Added a bunch of semi colons that were missing for some balls weird reason.
Oops, left some debugging crap
Newer posts
Older posts
Socials & More