Unpaid ads:

Stackoverflow is the most addictive developer's resource. Go check it out now! I use it myself, and I got to tell ya, they don't call it "crack overflow" for nothing.

Joel helped me find my current job. Check out the Joel on Software job board if you are not happy with yours.

WestNIC provides reliable reseller hosting services across the globe.

Evernote is the best code, memo, photo, todo, wishlist application I've ever used. Mad props for making Memex real.

What's All this Then?

My name is Michael Krakovskiy, and this is my blog.

Here's what you might find interesting:
100 Views of the Empire State Building project: I try to take 100 interesting photos of Manhattan's (sadly) tallest building.

My Gastronomic Adventures: I eat weird food - from 13 year old New Coke to Durian and parasitic fungi.

My attempts to grow exotic plants: pineapples, coconuts, etc.

My photos, mostly of New York City.

My musings about architecture mostly illustrated with my own photos. Would you like to learn about a mental patient who died at 103 who served as a model for some very famous sculptures? How about Brooklyn's ugliest building? How about a wooden skyscraper?

I find myself frequently writing about logos. The most popular article I ever wrote is about the redesigns of the Starbucks logo.

I wrote a series of "Best Sci-Fi You Haven't Read" posts:

Psywarrior
Yes, Virginia There Is Synergy
Call Time Police - We've Got a Time Traveler

Other topics that interest me include NYPD, New York City subway system, Japan, and things made out of titanium. On top of all of that, I seem to be interested in pigeions and Rupert Murdoch.

Dear reader, please browse around. You are sure to find something interesting. I could really use some help in bringing in readership: subscribe to the rss feed, digg the stories (there's a convenient button at the bottom of every article), link to my blog from yours, write some comments. I put in a lot of effort into writing, and I really appreciate your attention.

If you don't want all this pseudo-intellectual and want some lolcats? Please don't go away. Here, I have that stuff too. Here, here's another. And another. And another. I lied about not posting cat pictures.



Side Effects Of Programming

"Nelson: Ah, he's the greatest showman since that kid who eats worms!
Kid Who Eats Worms: My 15 minutes of fame are over!"
The Simpsons, Episode 3G02

The post about Durian seems to have been the most popular one in the recent history of deadprogrammer.com . This once again proves that eating gross things is entertaining to the masses. To prevent the surging popularity of my blog I absolutely must write a little bit about something that I almost never write about. Programming.

My co-worker who could not understand why he could not increment a variable in XSLT found an amazing piece of technical writing in an O'Reilly book about XSLT. Here it is:

"Although these XSLT variables are called variables, they're not variables in the traditional sense of procedural programming languages like C++ or Java. Remember that earlier we said one goal behind the design of the stylesheet language is to avoid side effects in execution? Well, one of the most common side effects used in most procedural languages is changing the value of a variable. If we write our stylesheet so that the results depend on the varying values of different variables, the stylesheet engine would be forced to evaluate the templates in a certain order.

XSLT variables are more like variables in the traditional mathematical sense. In mathematics, we can define a function called square(x) that returns the value of a number (represented by x) multiplied by itself. In other words, square(2.5) returns 6.25. In this context, we understand that x can be any number; we also understand that the square function can't change the value of x.

It takes a while to get used to this concept, but you'll get there. Trust me on this."

(full text here)

The quote that I highlighted in bold absolutely gets me. Yeah, that's one good side effect. I get the feeling that XSLT was committee designed with the specific purpose to make life miserable for programmers. Also that committee must have had some really good stuff to smoke.

Update
Uh, see, now this is what happens when you try to write programs without actually understanding computer science fundamentals. I did not realize that XSLT was functional, not procedural. Like most mediocre programmers out there I was not exposed to much functional programming (I did try to teach myself Lisp, but quickly gave up). Having to do a lot of SQL(which is near-procedural) over the years improved my understanding of functional programming, but not enough to realize what the XSLT book was talking about (reading it from beginning would have been helpful too). Now hardware XSLT accelerators, which made me laugh when I first heard about them, make sense too.

No votes yet

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a><b><i><img>
  • Lines and paragraphs break automatically.

More information about formatting options




 Subscribe in a reader

More Unpaid Ads:

Jesse Reklaw's Slow Wave comics absolutely rock!. Jesse designed Deadprogrammer.com corner graphic, the one with the programmer and the cat. And now you can buy his new book - The Night of Your life: