coding
You are viewing stuff tagged with coding.
You are viewing stuff tagged with coding.
Ok, I’m about to start posting an 11-month backlog of pictures and videos. By way of explanation: I usually am off by about three months, maximum, on posting stuff we have captured with our phones. But, last fall everything came together for us to invest in a Synology DS1517+, a network-attached file server. It took me months to set the entire thing up to my liking, including storing our Photos and iTunes libraries on sparse bundles. In the meantime, posting here was on hold as those libraries were in flux.
So, I anticipated this problem when we gave Ess her full name: Esmé… but I didn’t quite realize the extent of the problems she’ll have with computers accurately displaying her name:
… my girlfriend’s surname contains an ‘é’. I have yet to see a year go by without receiving mail having ‘é’ on the address label where the é should be.
…
We’re Dutch, and the é is part of our language, and even part of the legacy character encoding standard everyone used before Unicode’s widespread adoption. This is just a matter of code that works perfect as long as all characters are part of the ASCII set, but fails on the characters that don’t conveniently match between UTF-8 (é) and ISO-8859-15 (é).I doubt these issues will go away within even, say, twenty years.
Rash decisions always feel like sure bets before you act on them: I recently went “you know what, upgrading this server’s Ubuntu LTS won’t be a big deal — I’ve done all these package updates for the past few years with nary a hiccup… I think I’ll just purge my PPA repo (since ffmpeg is officially back in 16.04.1), open a screen
session, and get going! And, for a multitasking win, I’ll do it in between seeing patients!”
I can’t tell if I’m tackling more ambitious projects or if I’m getting worse at programming.
In 1999, I was exploring this new, amazing thing: the world wide web. I wasn’t an active participant in any social areas like Slashdot nor was I a gamer. Instead, I mostly kept to myself, fascinated as I was with how this world wide web thing worked. You see, growing up, if my toys had any screws on them, I would inevitably find the appropriate tiny screwdriver and open them up. I was consistently disappointed that there was little for me to do other than replace the plastic cover I had removed.
I just finished revisiting some regex code that begins like this:
preg_match_all('%{\$([^} ]+?)}%u', $template, $templateTags);
and becomes a rather bit more complex after that. I wrote it back in 2008. That aging code was sound but needed some updating; actually, I remember walking through Saint Paul, on my way to workout at St. Thomas (at a gym that no longer exists), puzzling through the right way to do nested parsing of template code. I wanted to be able to write these nice clean templates that this chunk of code would then take a look at and replace with content. What I mean is, if you can keep content apart from presentation, you are afforded a lot of flexibility. So, if in the future webpages are written in a completely different language, or if I want to produce an archival version of the site (say, a printed book) in a different format, then this code is the bridge between raw information (content) and final output (presentation).
I’m 13 years in, trying to build a blog that will last my entire life. I’d like to share what I’ve learned about thinking and coding for the long term.
In late 1999, I was 14 years old, and had just spent the last few months absorbing TI BASIC and trying to grok Z80 assembly. Seeking a community of like-minded individuals, and lacking the wide net or social aspirations to find one locally, I was also hard at work assembling an archive of TI Calculator software using free web site hosts like Angelfire and Tripod. I won’t link the results because, wow, are they embarrassing.
Finished another root canal today, which means I can stop worrying about that person’s tooth. Wrote up an extensive treatment plan. The school is generally horribly inefficient — though it can be a great place to learn if only you have the right instructors.
Now, I’m at home, waiting for Mykala to get here. She’s at work until 10pm. We don’t see one another nearly enough: maybe two hours on a good day. Last night, she fell asleep in my arms on the couch. That’s my absolute favorite.
I have never, in my entire life, as I tried to complete the spectacular variety of electronic tasks that modern life throws at us, thought this: “Damn, I wish I understood Unix less.”
I don’t have really many screenshots, mock-ups, etc. at all of what this website has looked like through the years. I do have a 9-year-old desktop computer that probably still contains those things; perhaps I will compile them sometime. Anyhow, this lack of documentation is somewhat ironic, because I run tumbledry to write about my life. Apparently, writing about myself is enough navel gazing for one place; adding another layer by contemplating the tool I’ve written for contemplation would be quite narcissistic, wouldn’t it? All that said, here’s a screenshot of how tumbledry looked not too long ago:
Eleven days ago, my piece about serving millions of hits with limited resources hit the top of the popular Hacker News website. The visits to tumbledry went from 42 the day before the article to 29,000 the day after. Since then, comment spam has been continually left by what are most likely automatic little programs called bots.
Here’s a quick summary if you haven’t time to read the whole thing:
Solaris 5.11 (virtual: Joyent SmartMachine)
PHP 5.3.6 with PHP-FPM: 4 instances running, 10meg APC cache
nginx 0.8.53
Pax 1.0 (my silly self-coded website software… and yes, oops there’s already software with that name)
120 megs of RAM used
Load tested using blitz.io: 9 million+ daily hit capability
Since the humidity and heat decided to die down for a day, it has been feeling downright cool outside — 70° with a pleasant breeze. Things smell different — there’s a crispness that isn’t fall but isn’t the oppressive July heat, either.
Halfway through yet another rotation (pediatric dentistry), I’m beginning to realize that there is a point in my life when I’ll be done with dental school. At that point, I’ll have a world of options in front of me. Like a river delta opening into the ocean, my life will have 1000 directions where there once was one. Invigorating, right? Well, I suppose. More on that in a minute. Here’s something I wrote almost four years ago, on the private changelog for my software that powers tumbledry:
I’m just a student in a field unrelated to computer science, but I’ve been coding for years as a hobby. So, when I saw the current state of infinite scroll, I thought perhaps I could do something to improve it. I’d like to share what I came up with.
And here we are. A brand new design for a… well it was going to be “for a new year”, but that didn’t work out so well. Anyhow, I’ll be squashing software bugs and refining things over the next few days.
For about the past twelve months, I’ve been convinced that I could design a better tumbledry than the one you see in front of you. With help from Mykala, Hoefler & Frere Jones, and Dive Into HTML5, that idea of improvement is becoming reality. I’m excited.
Did some code refactoring here at tumbledry over the past few weeks, and fixed a few bugs, too. If anything isn’t working right, please let me know! I’ll be updating server software here soon, and then I’ll have no time to think about tumbledry maintenance for another 11 months!
I’ve been working on this version of tumbledry since January of this year — there were times I never thought it would be finished — and yet, we’re almost there now. During the next few days, there will be a short beta period in which I will add a few features and iron out any remaining kinks; leave comments here with your thoughts.
Hi, mySQL. Thanks for being great. But seriously. COULD YOU WARN ME NEXT TIME YOU HAVE AN ARBITRARY LIMIT ON ONE OF YOUR VARIABLE TYPES?
Curious? Ok. The max value for the TIME type in mySQL is 838:59:59. I’m sure you have some justification for picking 838 hours, 59 minutes and 59 seconds… but holy crap mySQL, could you warn me for functions like TIMEDIFF()?!
A lovely little Wikipedia stub teaches us, as in programming, as in life:
There is more than one way to do it (TIMTOWTDI, usually pronounced “Tim Toady”) is a Perl motto. The language was designed with this idea in mind, so that it “doesn’t try to tell the programmer how to program.”
↓ More