If you’re into math puzzles, you have probably come across the Josephus Problem at some point or another. If you enjoyed testing your ability at finding the right spot, there’s an interactive version (the theme slightly mangled with creative licence). Enjoy!
If you know me (or have worked with me) then there’s one thing you’ll be quickly become aware of with regards my coding behaviour: tests. I love tests. More importantly, I love meaningful, passing tests that validate my sanity and check my logic in critical areas.
upgraded re-written cousin: Jasmine. There’s not much I can say about getting going with Jasmine since, to be fair, it really is so simple and well documented on the site already, needless to say:
1. Don’t Panic
This useful bit of instruction should be mandatory on every new piece of technology and before you take on any new learning. Don’t you feel better already?
The primary folder of interest is the aptly-named lib folder which is, well, the core library.
3. Prepare a test runner
You need a test runner (test harness, if you like) for actually running the tests and a demo has been provided for you in the form of the included SpecRunner.html
4. Write tests
The included ‘src’ folder is the sample functionality under test. This is usually your own code. The ‘spec’ folder contains sample test code. I say -test- but when you start moving into proving behaviours, -test- seems such a dry word, and so the word -specification- is born, but that may sound too technical and daunting (until you become used to it). The two are, for all intensive purposes the same to the newly initiated, but quite different once you start grokking the subtle differences.
5. Have fun
Now go get on with doing something awesome.
Because i code… and code… and code… then code some more (you get the point) i tend to spend a fair amount of time with my fingers on the keyboard, an open LCD monitor staring back at me and worlds of awesomeness (all disguised as code) swirling around me. And then every so once in a while I’ll get some fresh air and go do something else “cool”.
But for the most part, i sit. Sometimes slouch. Badly.
Then a few years ago i started with regular back pain. I won’t bore you with the details. We have all back pain somewhere between the thoracic and the lumbar. It happens. And so i tried almost everything to correct my bad posture. Surfing helps keep that back flexed “the other way” but you can’t -always- surf. Ok, so you can. But unless you’re really really (really really) good or have rich grandparents, you’re not going to eat nicely (an entirely different problem altogether).
Alexander Technique, sitting on a oversized (and somewhat colorful) swiss ball, taking frequent breaks; all the tips you can throw a Google search at. Even tried changing my desk setup and “sitting correctly”. I followed the diagrams and posters on the walls of the physio to the ‘T’. None of it was that practical and most of it interfered with “me”. The ball actually made my shoulder/back problem worse.
Then I got a Mac and that all changed. Just kidding. It wasn’t the Mac 🙂
No, quite accidentally, i came across working out with kettlebells right about the time my brother started working at this gym in cape town: one80. Of course he learned a lot working there and he shared his knowledge and as he settled in, i spent some time working out with one80 here and there. The short times that I have spent in their gym inspired me to do more body-weight and kettlebell workouts. The result: no more back pain!
I can code for hours longer… i can swim way more than i used to… i feel “lighter” on my feet and i’ve had to do some pretty amazing things around the house. For example; fix a curtain rail from a very awkward angle (which, in a thousand words i won’t get right in describing) needless to say when my daughter walked into the room and saw me she said: “Wow, Mommy. What’s Daddy doing?”
No to mention the almost-daily heater-goblet-squat up and down two flights of stairs (once in the morning, once at night). Not that easy when you have a baby-gate to navigate and the gas bottle is full. And of course, playtime is so much more fun when you can squat, press and launch a 13kg toddler for 20 quick reps.
So, yes. If you just know you need to get back in shape -even if it’s just so you can code for longer or survive behind the keyboard for those extra hours- turn your life around, one80 degrees.
I guess a lot of folk don’t realise just how many creative and energetic startups are born in South Africa (there’s a lot in that for another story some day, bit not today) and one of the more recent ones is personera.com.
Aside from the energy these guys have been feeding off and into the world wide social web, the brainchild Sheraan Amod certainly seems to have done all the right homework. Particularly useful was this quick piece on marketing innovation.
A suggestion for all budding (and current) BlackBerry developers out there. When you purchase your signing keys, be sure to NOT use your regular email address. Instead create an account like email@example.com or firstname.lastname@example.org to receive all the automated emails you get when signing.
For example, on one project, I have a build process that signs about 30 .cod files per build. But each build has specific builds for different OS levels, as well as different builds for testing, staging and production.
Add that up and you get 30 .cod files x 3 (one for each cert) = 90 x 3 (for each build type) = 270.
270 x 2 (for each platform) = 540. 540 x 4 (one for each white label) = 2160 emails!
For a daily build… and then adhoc builds. And not including any other projects. And you cannot get rid of the automated emailing. Standard RIM policy.
First off, thank to readers who gave me feedback on this site/blog. The single most important issue raised was readability: “Bryan, my eyes hurt. Please increase the font size.” Sorry.
Being a pure techie-hacker, I get used to reading print so small (and hence writing) that it breaks every law in the how-to-improve-your-website-guide (pick one of a dozen or so). Funny enough, I spot this trend quite quickly in all my clients’ work (but ignore it so close to 127.0.0.1).
That said, the font has improved; things are a little clearer and easier to read. This is good.
So, I’ve recently come into “loanership” of a brand new box for a specific project and it was loaded with my most favourite of favourite operating systems (not). Microsoft Windows 7 Ultimate 64-bit edition. Wow. After rolling that out my mouth, I have installed on it (stock standard next, i agree, next, next, finish) Microsoft Sql Server 2008 R2 64-bit edition. Wow again. There’s a lot of editions and bits flying around here quite casually.
And to boot, there’s Microsoft Office Professional Plus 2010. Oooo. The joy.
First development-related task on shiny hardware (with an OS that is probably a tribute to Timothy Leary) is … wait for it … really complicated … so i need you to focus now … import a flat file (a CSV or comma-seperated values file) into a brand spanking new database as a table. Without writing a single line of code and using all the tools provided by all the spunky long-winded monikers. Tricky? Apparently.
The real joy came in when clicked retry. Phooof!
Having had a look at jQTouch, it was time to see what you can and cannot do with the framework.
A screenshot is worth a thousand words so here are a thousand words:
So this is what it looks like in Safari (don’t bother with any other browsers really since it’s not really targeted for anything else than the Apple family). Pretty neat. And in action:
And it ticks along nicely, better ui framework and better looking than it’s original cousin :p
So, naturally, how does it function on the smaller devices? Well, it looks pretty much the same on the iPod Touch and I did get it to tick over smoothly… but…. some intermittent success. Will have to look more into that.
Otherwise, it’s all yours to test-drive here.
UPDATE: just finished testing it on my new android browser (which i’m also busy writing from at the moment) and it works super nicely 😉
Why? We spent a lot of money, time, energy dealing with an international body responsible for managing the game played with a round ball while they were in our country for the tournament where a whole bunch of international teams came and played against each other; they call it the “beautiful game” and it was played on our doorstep. Make no mistake, the event for us was phenomenal for a whole bunch of completely unrelated reasons. Sure, for the footy fans it was about footy. For the rest of us who puzzled over a round ball that bounces straight- it was something else magic entirely.
But it came with a price. Bans on anything and everything related to world cup, 2010 = protecting copyright$. And some clever advertising scored even bigger when they were challenged and forced to come up with something
But it’s not just a souf efrican thing:
I keep a log on my router to track network activity originating from within my firewall -a healthy dose of paranoia combined with the fact that there still is one virtual PC running Windows on my network. And so from time to time I check the logs, not so much the detail but the quantity. All good. Today, on a fresh log, before I really started doing anything I did notice one odd detail: TCP Packet – Source:192.168.10.8,50096 Destination:220.127.116.11,25 – [SMTP rule match]
Odd because I hadn’t sent out any emails yet. Odd because that’s an unfamiliar IP address (even I did send out emails). Odd because I send emails over SSL (a different port entirely). And so the trace went:
* A quick check on the IP revealed the domain: 1e100.net and location Los Angeles. Definitely nothing I’m associated to. I think.
* A Google search (oh the irony) on 1e100.net and it turns out, this is a Google address.
* Your browser sends out “relatively” anonymous data to Google about your browsing habits- at least something like that: Safe Browsing Policy
Back to DEFCON 4.