Archive for June, 2009

29
Jun

Our digital lives are empty and sad

   Posted by: Swizec    in Uncategorized

23
Jun

Unit testing is anti-productive

   Posted by: Swizec    in Uncategorized

Salish Mist
Image by ecstaticist via Flickr

Today I finally got my feet wet with something I’ve been meaning to try on for size ever since reading Clean Code, during my trip to Vienna last autumn; wow has it really been that long already, where’d winter and spring hide?

Anyway, so at about midnight last night I finally embarked on the process of coding up a new feature for Twitulater, or at least its server-side bits, after some prep work. Now since this is a rather mission critical system that I’d very much like to be somewhat reliable and rock-solid, unit testing seemed to be the way to go.

Downloading PHPUnit gave me some headaches, because ubuntu’s package managers fucked something up. Why is it I can’t install Pear if there are broken packages for something completely different? Then came the figuring out of how to actually do unit testing and I must say, it was incredibly simple. Of course I did have eight months’ time for the principles grokked from Clean Code to seep in, but still.

Mostly I was suprised to finally confirm that I have been doing test driven development (TDD for you acronym junkies) for a long while. Just in reverse. Whereas now, with automated unit tests, I first write a test, then the code, I used to write the code then test the hell out of it. With PHPUnit testing has become much less of a hassle – run a command, make sure everything works. Nice!

However, unit testing has one large drawback. It took me a solid six hours of coding to produce … nothing. I have in my possession now 200 lines of real code that doesn’t implement much other than making sure users exist and authenticating them, and a bunch of tests taking up a full … 170 lines of code. This is of course after some refactoring and whatnot, the original ratio was always that there were twice as many tests as there was actual code. Yummie.

Now I’m sure many of you will bash me for being such a dirty little blasphemer, but fuck it. Despite all the headaches saved with testing, despite making testing a lot simpler and quicker. It still took me SIX BLOODY HOURS to create some functionality that never used to take more than two hours to code and debug.

Tags: , , ,

19
Jun

Slovenia desperately needs more burlesque

   Posted by: Swizec    in Uncategorized

The dance of Salome - painted by Franz von Stu...
Image via Wikipedia

Be advised, I am currently fighting a deathly battle with a nasty cold so the rest of this entry might feel a bit foggy and poorly phrased. You were warned.

Burlesque, for those who don’t know, is a type of performance art much like striptease and other “exotic” dances, but on a far more refined level. Now I can’t say this for certain having only seen the regular sleazy striptease in person, but burlesque seems to be a far more enjoyable viewing experience than pretty much anything one could imagine.

What I love about burlesque is that a lot of it doesn’t even necessarily involve nudity, much of it is just damsels hopping about on stage in fancy dress with a supporting cast of burly men in drag. And there’s a lot of music, good music.

Striptease on the other hand is a bit of a meh, sure the broad gets naked, but it’s all so distasteful, so sleazy and rotten it’s nigh on unenjoyable …

Therefore I propose that we need to have more burlesque shows in Slovenia, especially because traveling to the US or London or whatnot just for a show of such nature can hardly be justified. I’m told that there have already been certain occasions of burlesque shows, but I’d be very glad if someone could point me to more such things … especially, you know, like before the event? Can do? Please do. The closest I’d ever seen to burlesque was Cabaret in MGL and in London, but it’s just not quite what I’m looking for despite being a supremely awesome show.

Now just for a quick taste, here’s some Miss Meow Meow, whom I’ve just discovered today and instantly fell in love with almost as much as with Amanda Palmer.

And since no post about burlesque can be complete without mentioning Dita von Teese. There. Dita von Teese. Hope you’re happy now.

Reblog this post [with Zemanta]

Tags: , , ,

14
Jun

New steampunk crap in my room

   Posted by: Swizec    in Uncategorized

Utopian flying machines of the previous centur...
Image via Wikipedia

Some of you probably realise that I’m a bit of a steampunk and have been even since before I realised steampunk was what I was a fan of. Think I called it

Tags: , , , , , ,

11
Jun

Internet memestalgia

   Posted by: Swizec    in Uncategorized

Been listening to the llama song a lot lately and was reminded of all the brilliant memes that existed on the internets long before there was youtube or anything like web2.0. It was quite a different time in our lives and accordingly the humor was much different as well.

Enjoy these old classics, do hope you still remember them.

Reblog this post [with Zemanta]

10
Jun

I am a Groundbreaking Thinker …

   Posted by: Swizec    in Uncategorized

… accord to a personality test I just took. Wow, groundbreaking AND a thinker. I’ll take it even though the very first question I was given had me thinking for a while which option I should pick. The rest were simple dead on choices. Woot!

But I’ll let the test do the talking savvy?

Groundbreaking Thinkers are charming, enthusiastic persons. They really bubble over with energy and like to take centre stage. They love variety both professionally and privately. Groundbreaking Thinkers tackle changes consistently with their optimism and firm belief in their own abilities; they are always on the look-out for improvement possibilities. Their excellent communication skills are of great advantage to them here. They approach the world with curiosity and openness and master new situations with a great deal of talent for improvising and with resourcefulness. Their spare time is taken up with a large number of hobbies; most Groundbreaking Thinkers like to travel in order to gather as many different impressions as possible. This personality type is unbeatable at discovering new possibilities.

In their work, Groundbreaking Thinkers highly rate challenges and diversified tasks. They cannot stand routine and too detailed work. They love to astound others with bold ideas for an original, new project and then leave it up to the others to implement them. Hierarchies, rules and regulations arouse their opposition and they love outsmarting the system. It is vital to them that they enjoy their work; if this is the case, they quickly become pure workaholics. Their creativity best takes effect when they work independently; but they are very good at motivating others and infecting them with their optimistic nature. Conceptual or advisory activities appeal especially to Groundbreaking Thinkers. It can happen that some people feel somewhat duped by their flexible, spontaneous nature. Learn more about the Groundbreaking Thinker at work …

Their sociability and enterprise ensure that Groundbreaking Thinkers always have a large circle of friends and acquaintances in which activity plays an important role. As they are mostly in a good mood, they are popular and very welcome guests. Grumbling and peevishness are unknown to them. However, they do tend to be a little erratic and unstable when it comes to obligations and this makes them appear to be unreliable to some. Groundbreaking Thinkers are very critical and demanding when it comes to picking a partner because they look for the ideal relationship and have a very concrete picture of this ideal relationship. Mutual aims in life are very important to them. They do not like compromising and would rather remain alone. For the partner, it is often a challenge to have a long-term relationship with a Groundbreaking Thinker. Groundbreaking Thinkers need a lot of space and diversity or otherwise they become bored and feel cramped. Types who are rather more traditionalistic often have problems with the willingness of Groundbreaking Thinkers to take risks and their often crazy, spontaneous actions. However, if one can summon up sufficient flexibility and tolerance for them, one will never be bored in their presence and will always have a loyal and faithful partner. Learn more about the Groundbreaking Thinker in love …

I’d be hard pressed to label this as good or bad, but I’m sure I get on a lot of people’s nerves.

Reblog this post [with Zemanta]
6
Jun

Slovenia php conference day2 (live blogging)

   Posted by: Swizec    in Uncategorized

10:16 Today was horrible walking weather. Groggily stumbling to IJS felt a bit like trying to swim through a sauna. I don’t even know how late I was getting here, but I somehow managed to snatch the very last energy drink. Yay! Shame I’m in last row this time … think we’re listening to @markostamcar talking about … something. Is this the “code snippets that saved my life” talk?

Smoke sauna in Enonkoski, Finland.
Image via Wikipedia

Oh and before anyone asks again, yes, I’m the guy in a black bowler and no that card is not an Ace. Never an Ace.

10:29 @markostamcar just admited to being a dirty dirty pirate thief. Wonder if anyone from the MAFIAA is here or we’re all just a bunch of dirty swashbucklers? Interesting code bit, think it calculates a foreign TV guide into local time for torrent browsing.

10:34 Interesting thing I just noticed. Trying to make fancy <?phpconference in a blog title makes wordpress do funny things like simply cutting everything ahead of <? off. Couldn’t you please just escape it? It felt lovely having it there and now my url is all funky.

10:51 Miha Hribat made a refreshing commercial break for igrajmo.se, whatever that is. Looks interesting, but the talk will be about caching dynamic content. Hopefully we’ll all learn something new even though most of us have probably dealt with this before.

10:58 MogileFS is an opensource filesystem written in perl that runs on the application level and, apparently, uses everything from the DB, disk system and some other funky stuff to keep data safe and bloody quick to access. Sounds very nice. And now the more interesting part about memory caching – the really important thing when it comes to cache. Oh hey, I just noticed a corporate-approved dry joke. Well done!

11:03 Yes memcached! The greatest thing since caching was invented and of course, all the big names are using it. Been a while since I played around with this thing, should probably try it again. Miha says the biggest object you can store is 1MB in size and since Twitter complained about having a problem with one of their important objects exceeding 1MB I’m concluding twitter uses memcached as well … oh hey I didn’t know memcached will only keep things for at most 30 days.

11:35 Anze Znidarsic will be talking about abusing flash+php to make rich internet applications. And he just received a raging applause for giving us a 15 minute break :D Win.

11:54 Anze is talking about Flash on the internets, what we can and what we cannot do. Personally I hope flash dies a quick death and we shouldn’t be abusing it to do new things like we did with pdf. Sure it’s difficult to make things work the same in every browser, but we don’t HAVE TO. What we need to do is teach users that things won’t look the same everywhere, even native desktop applications don’t look the same on everyone’s computer.

12:01 According to what is being said I’m really going to need to look into this Flex Builder thing. It’s quite ama

As Seen on Television album cover
Image via Wikipedia

zing how, apparently, you can just design something in Photoshop, export and then just add some working logic and you’re done. Looks incredibly simple and like a very fast workflow. Lovely bit is how I can abuse this lecture to pretty much deal away with half the things I could have said on my talk in a few hours. Brilliant! Thanks Anze.

12:11 That is a wonderfully brilliant sample app. Basically a project managment tool for girls. Stores girl_id and her status that is one of “Done”, “to-do” or “in progress”. Today is definitely much better than yesterday was.

14:06 We’re back from lunch and Mr. Somebody, didn’t catch his name, is talking about Comet, which is apparently a method for pushing data from server to client and doing it live. This is something I’ve always wondered about so I’m about to have my wet dream answered.

14:12 Comet is interesting. Apparently it’s some sort of reverse Ajax and once more isn’t a technology in and of itself (just like Ajax) but an architecture design. HTTP/1.1 allows us to do this crap and even though all of this is starting to make a little sense it’s quite odd. It’s polling, but not polling, or is it polling? Damn, can’t wait for the practical demo. (Oh the guy is Mitja Kramberger, cool guy)

14:20 There almost seems to be more problems with Comet than it provides solutions. Interesting. Since I’m not actually

Image of Robert Basic from Twitter
Image of Robert Basic

understanding a whole lot of this (thanks @robertbasic for giving that wikipedia link) there isn’t much summation I can do for you blog readers. Sorry. Or maybe I’m just not paying enough attention since nervousity is building up ’cause I’m up next. Whose stupid idea was it anyway to get over public talking anxiety by talking publicly a lot? Idiot.

14:31 Comet on the server is where it gets really interesting. Traditional server software is #fail because you need man concurrent connections and they’re made to quickly close everything and get on with their lives. Someone should implement an event-based IO, but nobody’s really done anything yet, working on it, just not done. So when somebody DOES make something, will the web be all buzzy and broken and fubar and odd as it was when Ajax first became popular?

14:35 I was wrong. There are many implementations … makes me wonder why not everyone is doing this just yet like they did with Ajax? Poor gecko browser support? Developer ignorance? What?

16:00 Wow, I’ve never had so much fun talking in front of a large crowd for 45 minutes before. Not sure what it was, but I simply blabbed my mouth off. There were even questions when I finished! Yay. Anyhow, seems we’ll be listening to Toma

Tags: , , , , ,

5
Jun

Slovenia Php Conference 2009 (live blogging)

   Posted by: Swizec    in Uncategorized

:12Passwords are the whipping boy
Image by leeleblanc via Flickr

Wet, late and hungry I arrived at the IJS venue where I’ll be staying all day listening to odd people talking about interesting stuff – very interesting I hope. Just so you know, I have a valid excuse for being late and missing the event’s introduction and everything, but let’s not get into that now (just so you know, I didn’t oversleep).

Right now I’m listening to Dusan Omercevic, I believe, talking about openID. Don’t really know what’s going on since I missed about half his lecture :D

10:23 Currently we’re discussing what the biggest problem of openID is and why it will never be used as a service but rather as a technology. Apparently the crux of the matter is that users like simplicity and corporations want huge databases of their users. Personally I think this will effectively kill openID, because every site or group of sites will have their own openID and users will still end up having twenty different usernames and passwords … except they’ll be called openID’s.

10:45 We’ve reached the other portion of this openID talk and it’s … not very interesting. A lot of technical stuff, which is just discouraging me from using this protocol. I still don’t exactly understand why I should. Coding a regular login system is easy as hell, this just seems needlessly complex for probably around 90% web devs out there.

11:28 Very interesting invitation to try along this guy’s hacking techniques on our websites. Should be useful to test Chlorine Boards. Hope I don’t do too much damage, ’cause I don’t have anywhere else to test than production websites.

12:12 Wow I think I need a new pair of trousers ’cause I just shat brix! The methods for doing crazy fun things on other people’s websites that Ga

Tags: , ,