Posted on 6th of November 2010
I’ve been reading a bit about a certain kind of japanese philosophy called “wabi-sabi”, which is a japanese world-view and aesthetic. The list, which contrasts wabi-sabiwith modernism, is from Koren’s book, which contains many beautiful pictures of objects that embody the wabi-sabi philosophy. There seems to an inherit satisfaction in thinking about these juxtapositions for me. Perhaps favoring neither, but seeing the validity of each of the opposing stances.
Read the rest of this entry »
Tags: aesthetics, philosophy
Posted in Other | No Comments »
Posted on 1st of September 2010
I had a new experience (for me anyway), someone approached me with offer of reviewing a new Javascript book that Packt recently published called “Javascript Testing“.
I guess this is mainly a way of promoting ones book, but it’s been a while since I actually read anything new on Javascript, since Douglas Crockford mostly has this business down in terms of the core language itself these days. But a book about testing sounds interesting to me, because while I have always loved the core language, JS has often had rather mediocre tools in my eyes, and will be interesting to see what the book offers up in this area.
On an unrelated note, I can add that while I rarely update this blog, I do run a rather useless twitter account which I attempt to spam with inane stuff as much as possible, as is the custom!
Posted in JavaScript | No Comments »
Posted on 28th of August 2009
Vim is a nice editor, but I never liked the way it handles files. Thankfully I recently found a great script, which adds great quick browsing capabilities to Vim, called lusty-explorer.vim. Since 7, Vim has supported not just it’s own homegrown (and honestly fairly bastardized language) called VimScript, but also it has included bindindgs for popoular scripting languages such as Ruby and Python, so extending this script with some extra functionality was a great way to see how Vims extensibility works. And with lusty-explorer written in Ruby, this was a nice chance to learn these new aspects of Vim.
Read the rest of this entry »
Tags: editor, remotedesktop, vim
Posted in Other | 8 Comments »
Posted on 22nd of July 2009
Recently, I tried to use jQuery, as a way of dynamically loading all the scripts that a certain page requires. Instead of utilizing script tags in the header section, using a simple $.getScript("script.js"); loads the same code, what’s more, this code is loaded asynchronously, which helps improve loading performance. The only problem is that loading scripts this way, makes them unavailable for debugging.
Debugging dynamically included script files presents some special challenges on it’s own. The primary being that that the web is basicly not a structured enviroment, like a folder on disk, and references to files and/or code is can be very intermittent.
Read the rest of this entry »
Tags: ajax, debugger, JavaScript
Posted in JavaScript | 4 Comments »
Posted on 5th of June 2009
Recently, I was compelled by a friend to download GNU Privacy Guard, GPG in short, in order to do things “properly”, when we were gonna exchange some possibly sensitive data. Now, GPG is a open-source re-implentation of the venerable PGP, Pretty Good Privacy, which was one of the first widely used programs using the public-key cryptography. Public-key crypto is socalled asymmetric-key system, since the sender and receiver of a messege do not share a key before hand. It allows total strangers to communicate securely over in-secure lines. The internet’s SSL (which is usually what’s used when you see https in the address bar of your browser) is built on this technology. So what we’re dealing with here is a serious attempt at a full blown cryptographic system, used by people across the globe, wishing to communicate securely. With all this in mind, the experience I had when reading the following snippet in the Windows readme was even more jarring
The term “W32″ is used to describe the API used by current Microsoft Windows versions. We don’t use the Microsft terminology here; in hacker terminology, calling something a “win” is a form of praise. Keep in mind that Windows ist just a temporary workaround until you can switch to a complete Free Software system. Be the source always with you.
The Windows API is normally referred to as “win32″ (the 32 is a reference to the fact that it’s a 32 bit machine API). So by refusing to refer to the term “win32″, and instead use “W32″, it merely comes across as a totally juveline display of non-professionalism. Being termed a “hacker” is an honorary term in the programmer community, and as with all such things, you don’t get to name yourself a hacker. So it’s not only slightly buffoonish with the allusion to the hacker term “win”, it’s also quite campy with it’s Star Wars reference.
I’m all for the Unix philosophy and open source. In fact, I think it’s healthy for the IT world, that some people think in terms of more then just money. But when dogmatic advocacy gives trumps real world pragmatism, I’m off the train.
Tags: gpg, morons
Posted in Geek angst | 3 Comments »
Posted on 30th of March 2009
This is a problem I’ve been thinking a good deal about lately, without really coming to any conclusion, maybe because there is no right way. The issue can be summed up fairly easily, but it does betray the multitude of issue that lie beneath.
How do you handle non-english terms in your code?
Read the rest of this entry »
Tags: encoding, language, meaning
Posted in Other | 4 Comments »
Posted on 9th of March 2009
Every time I need to work with SQL, it never ceases to amaze. The language is simply such an abortion in terms of development enviroments and simple programmer usability. Naturally, alot of this stems from my inexperience with the language. Mostly this post is just my own personal gripes with about SQL.
So, at work I find that I need a function which takes a variable number of GUIDs, and presents me with a compounded status integer, pulling status indicators for each GUID, and producing a single status. Should be simple right?
Read the rest of this entry »
Tags: language, sql, sql server
Posted in Geek angst | 3 Comments »
Posted on 18th of February 2009
My site has been down for quite some time, while I both arranged some new hosting, and tried to save the contents of the old site. I want to once more, thank my buddy and old coworker, Lasse, for hosting this site for near on 9 years. Thankfully, seems that restoring WordPress is a simply matter of re-importing the SQL tables, and then uploading the whole thing to my new host.
Let me know if there’s any bumps on the site!
Posted in Uncategorized | 2 Comments »
Posted on 14th of November 2008
I’ve never been much of a C# maven or anything, but I’ve really fallen in love with this construct in the language. One thing which I guess almost anyone does alot of is building a string, from a list of business objects. Let’s say you have a list of GUIDs, and you either want to display them, or build an SQL string from them for use in a query.
List<Guid> gs;
string s;
foreach (Guid g in gs) {
s += "Id='" + g.ToString() + "' OR ";
}
if (result.Length > 0) {
s = s.Substring(0, s.Length-3);
}
That’s some good ole fashioned string fucking, and since I’ve come over from HTML/JavaScript/(Classic) ASP/PHP, that’s bussiness as usual by all standards. But I’ve never liked several aspects of it.
Read the rest of this entry »
Tags: anonymous-methods, CSharp, generics, list-comprehension
Posted in CSharp | 2 Comments »
Posted on 12th of August 2008
pngstrip (32bit, Windows Executable at 59 kb) is a small program I’ve written to strip out the various kinds of gamma and chromacity information from PNG files. It’s written in standard ANSI C, so should compile on anything reasonable, though it has only been tested on Windows XP. The source code is also freely available. It’s console program, just type out pngstrip filename.png, and filename.png will be stripped.
We spent years agonizing over the lack of 8-bit alpha channel in PNG in IE, and when we filly get it natively/nicely supported in IE they go and botch is so horribly.
Most of us have heard about gamma. But unless you do something in the graphics/print field, it mostly remains a button on our screen, where we tweak the luminocity of the screen. But of course, when an artist makes a snazzy PNG picture, making sure that it appears at the same display intensity as it did on his screen is understandably an laudarble goal. So PNG embeds gamma information, saying that this and that color, should be show at this and that intensity. The problem occurs when the BOG STANDARD (for 15 years and counting) HTML and CSS colors are NOT processed through the same system and thus don’t get the same gamma correction applied. The problem is easy to spot (need to be viewed in IE). The PNG files, once stripped, appears correctly.
I won’t really bother explaining this problem more, since it goes beyond stupid, I’ll just link further reading materials if you don’t know why you may wish to strip your PNG files for gamma information. Henri Sivonen has the best treatment on the topic.
Tags: gamma, internet explorer, png, pngstrip
Posted in Web | 2 Comments »