<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>/home/mlodz</title><generator>Tumblr (3.0; @mlodz)</generator><link>http://steven.mlodzianoski.com/</link><item><title>"Programmers will tell you to read this guy named “Dijkstra” on this subject. I recommend..."</title><description>“Programmers will tell you to read this guy named “Dijkstra” on this subject. I recommend you avoid his writings on this unless you enjoy being yelled at by someone who stopped programming at the same time programming started.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Learn Python the Hard Way&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/12198378689</link><guid>http://steven.mlodzianoski.com/post/12198378689</guid><pubDate>Tue, 01 Nov 2011 11:36:32 -0400</pubDate><category>python</category></item><item><title>JS.Everywhere Event Twitter Stream</title><description>&lt;a href="http://twitter.com/#!/search/%23wakanday"&gt;JS.Everywhere Event Twitter Stream&lt;/a&gt;: &lt;p&gt;This past Saturday was the JS.Everywhere conference put on by Wakanda. It was a lot of fun, and there were some really great presenters. Douglas Crockford gave a brief history and description of our favorite language,Julian Aubourg showed off jQuery’s “magical” deferreds, and Dave Terry gave a very slick demo of Wakanda.&lt;/p&gt;
&lt;p&gt;The above link is for the event’s twitter stream. I’ll likely follow up with more detailed posts about particular topics.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/11553355813</link><guid>http://steven.mlodzianoski.com/post/11553355813</guid><pubDate>Sun, 16 Oct 2011 21:25:37 -0400</pubDate><category>JavaScript</category><category>Wakanda</category><category>Wakanday</category><category>jQuery</category></item><item><title>Bash Tip: Control R</title><description>&lt;p&gt;&lt;span&gt;If you use the bash shell, you probably already know that hitting up will show the last command. Nice, but at some point you’ve probably had to go back dozens of lines before you got to the command you wanted, at which point just typing the command again is easier than hitting up 37 times.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Control R solves this problem. Type &lt;code&gt;Ctrl-R&lt;/code&gt;; it will prompt you, and what you type will filter your entire command line history.&lt;br/&gt;&lt;br/&gt;Lets say you want to restart your apache server, again, but you don’t remember that cryptic command you used 5 hours ago. You do remember it was &lt;em&gt;something something restart&lt;/em&gt;, and so you type in:&lt;br/&gt;&lt;br/&gt;&lt;code&gt;Ctrl-r resta&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;and before you even finish typing &lt;em&gt;restart&lt;/em&gt;, the following command appears:&lt;br/&gt;&lt;br/&gt;&lt;code&gt;sudo /etc/init.d/apache2 restart&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Awesome! Hit enter to use this command. Or continue hitting &lt;code&gt;Ctrl-r&lt;/code&gt; to scroll through more matching results.&lt;br/&gt;&lt;br/&gt;If you’re an Emacs user, you’ll notice that &lt;code&gt;Ctrl-r&lt;/code&gt; is the command for reverse search, which is exactly what we are doing.&lt;br/&gt;&lt;br/&gt;I had been using the command line for 6 years before I discovered this gem. I wish somebody had written a blog post about it.&lt;/span&gt;&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/10784353754</link><guid>http://steven.mlodzianoski.com/post/10784353754</guid><pubDate>Wed, 28 Sep 2011 19:37:59 -0400</pubDate><category>bash</category><category>tip</category></item><item><title>"When [Brendan Eich] was being interviewed [at Netscape], he told them that he would like to write a..."</title><description>“When [Brendan Eich] was being interviewed [at Netscape], he told them that he would like to write a Scheme interpreter, and they said “Wow, that’s great, that’s just the kind of thing we’re thinking of”. So they hired him, but before he started work, they found out what scheme was, and when he got there, they told him “Don’t do Scheme, we want something that people are going to like, make it look like Java or something”.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Douglas Crockford on the creation of JavaScript; &lt;strong&gt;The Tale of JavaScript. I Mean ECMAScript&lt;/strong&gt;&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/10319171178</link><guid>http://steven.mlodzianoski.com/post/10319171178</guid><pubDate>Sat, 17 Sep 2011 12:25:00 -0400</pubDate><category>javascript</category><category>scheme</category></item><item><title>"Remember that everyone makes mistakes. Programmers are like magicians who like everyone to think..."</title><description>““Remember that everyone makes mistakes. Programmers are like magicians who like everyone to think they are perfect and never wrong, but it’s all an act. They make mistakes all the time.””&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Learn Python the Hard Way&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/9506340477</link><guid>http://steven.mlodzianoski.com/post/9506340477</guid><pubDate>Sun, 28 Aug 2011 13:03:01 -0400</pubDate></item><item><title>"By the way, [Python] is named after the BBC show “Monty Python’s Flying Circus” and has nothing to..."</title><description>“By the way, [Python] is named after the BBC show “Monty Python’s Flying Circus” and has nothing to do with reptiles.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;didn’t see this coming… In the middle of Python Docs&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/8558349802</link><guid>http://steven.mlodzianoski.com/post/8558349802</guid><pubDate>Sat, 06 Aug 2011 11:03:00 -0400</pubDate><category>python</category></item><item><title>"Copy/Paste is not a design pattern!  &gt;:o"</title><description>“Copy/Paste is not a design pattern!  &gt;:o”</description><link>http://steven.mlodzianoski.com/post/8057687052</link><guid>http://steven.mlodzianoski.com/post/8057687052</guid><pubDate>Mon, 25 Jul 2011 17:52:22 -0400</pubDate></item><item><title>"It’s a long-standing principle of programming style that the functional elements of a program..."</title><description>“It’s a long-standing principle of programming style that the functional elements of a program should not be too large. If some component of a program grows beyond the stage where it’s readily comprehensible, it becomes a mass of complexity which conceals errors as easily as a big city conceals fugitives. Such software will be hard to read, hard to test, and hard to debug.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Paul Graham, Programming Bottom-Up&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/7730989337</link><guid>http://steven.mlodzianoski.com/post/7730989337</guid><pubDate>Sun, 17 Jul 2011 14:57:00 -0400</pubDate></item><item><title>"In a low-tech society you don’t see much variation in productivity. If you have a tribe of..."</title><description>“In a low-tech society you don’t see much variation in productivity. If you have a tribe of nomads collecting sticks for a fire, how much more productive is the best stick gatherer going to be than the worst? A factor of two? Whereas when you hand people a complex tool like a computer, the variation in what they can do with it is enormous.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Paul Graham, Great Hackers&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/7729462184</link><guid>http://steven.mlodzianoski.com/post/7729462184</guid><pubDate>Sun, 17 Jul 2011 14:07:00 -0400</pubDate></item><item><title>"I think $string is a fantastic variable name!"</title><description>“I think &lt;code&gt;$string&lt;/code&gt; is a fantastic variable name!”</description><link>http://steven.mlodzianoski.com/post/6118284926</link><guid>http://steven.mlodzianoski.com/post/6118284926</guid><pubDate>Thu, 02 Jun 2011 17:31:47 -0400</pubDate></item><item><title>"Job number one for our product-focused engineers is to effectively innovate for Netflix members. The..."</title><description>““Job number one for our product-focused engineers is to effectively innovate for Netflix members. The product we built in 2006 would not satisfy our members today. The best product in our market in 2015 will be far better than Netflix is today. It is our fundamental challenge to figure out what a better product can be on behalf of our members, and to build it.””&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://techblog.netflix.com/2011/01/how-we-determine-product-success.html"&gt;How We Determine Product Success&lt;/a&gt;, The Netflix Tech Blog&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/2846581952</link><guid>http://steven.mlodzianoski.com/post/2846581952</guid><pubDate>Thu, 20 Jan 2011 16:34:18 -0500</pubDate></item><item><title>Coding Horror: How to set a Height</title><description>&lt;p&gt;I once had to work with some very poorly written code, and I found this gem of a coding horror.&lt;/p&gt;
&lt;p&gt;Within the PHP code that printed the HTML markup, there was a section that printed JavaScript. What did the JavaScript do? It selected an element (which had just been printed in the code above) and set the &lt;code&gt;height&lt;/code&gt; attribute to a value based on the number of items inside the box. So you have PHP writing JavaScript which sets a style. That’s three technologies to do one simple thing. And the best part of it all: it was totallly unnecessary! I couldn’t understand why the height needed to be set, so I went ahead and set it to &lt;code&gt;auto&lt;/code&gt; (the default value), and it worked just fine. (Likely, the items within the box were originally floated, which means they’d be removed from the normal flow, requiring a set height). Needless to say, I removed the entire mess. (to give the developer credit, he was clearly a smart guy and wrote some good code; I’m not sure why he resorted to this elaborate setup)&lt;/p&gt;
&lt;p&gt;But let’s say you did float the elements within the box. Then what? Add an empty element after all the floated elements, like so: &lt;code&gt;&lt;br style="clear:both" /&gt;&lt;/code&gt;. (or better yet, put it in your CSS). The &lt;code&gt;clear&lt;/code&gt; attribute ensures the element appears below the floated elements, and so the containing box gets an appropriate height.&lt;/p&gt;
&lt;p&gt;Talking about this stuff reminds me how nice HTML layouts are. You almost never have to set the height or width of elements (unless you’re doing something tricky). Contrast this with Flash and ActionScript (to name just one example), in which you must explicitly set a height and width on everything, which is particularly annoying when you have dynamically sized content.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2373106138</link><guid>http://steven.mlodzianoski.com/post/2373106138</guid><pubDate>Sun, 19 Dec 2010 08:00:06 -0500</pubDate><category>php</category><category>javascript</category><category>css</category><category>coding horror</category></item><item><title>"If it’s more difficult to unsubscribe from your email newsletter than to mark it as spam, what..."</title><description>“If it’s more difficult to unsubscribe from your email newsletter than to mark it as spam, what do you think is going to happen?”</description><link>http://steven.mlodzianoski.com/post/2364120815</link><guid>http://steven.mlodzianoski.com/post/2364120815</guid><pubDate>Sat, 18 Dec 2010 16:00:00 -0500</pubDate></item><item><title>"Ruby is designed to make programmers happy."</title><description>“Ruby is designed to make programmers happy.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Yukihiro Matsumoto, aka “Matz”, creator of Ruby&lt;/em&gt;</description><link>http://steven.mlodzianoski.com/post/2362918317</link><guid>http://steven.mlodzianoski.com/post/2362918317</guid><pubDate>Sat, 18 Dec 2010 14:11:29 -0500</pubDate><category>ruby</category></item><item><title>Introducing Quick Overflow
When I need help with a technical...</title><description>&lt;img src="http://27.media.tumblr.com/tumblr_ld8ebcKgU01qf9d66o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h1&gt;Introducing Quick Overflow&lt;/h1&gt;
&lt;p&gt;When I need help with a technical issue, Stack Overflow is the first place I go. And sometimes I head over to Server Fault. But wouldn’t it be nice to search both sites at once? Now you can. &lt;a href="http://quickoverflow.mlodzianoski.com/"&gt;Quick Overflow&lt;/a&gt; combines &lt;strong&gt;all&lt;/strong&gt; the Stack Exchange Q&amp;A sites into one easy to use, super fast search page. So whether your question is about HTTP ports, Zerg strategies against the Protoss, or the ripeness of cantaloupes, Quick Overflow is the place to go!&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2169275250</link><guid>http://steven.mlodzianoski.com/post/2169275250</guid><pubDate>Fri, 10 Dec 2010 18:00:00 -0500</pubDate><category>questions</category><category>project</category></item><item><title>A Trivial Task?</title><description>&lt;p&gt;I’ve been doing a bit of Java work lately; I built a quick prototype in PHP and needed to convert it into Java. And I was shocked at a few things that are trivial in PHP but more difficult in Java. An example: I have text which may or may not (but probably does) contain HTML, and I want to simply remove all the tags to create “unformatted text”. In PHP this is as simple as&lt;/p&gt;
&lt;pre&gt;$unformatted_text = strip_tags($text_with_html);
&lt;/pre&gt;
&lt;p&gt;Easy! It’s just one line! Now how’s it work in Java? I won’t go into detail in this post, but you can read a solution on &lt;a href="http://stackoverflow.com/questions/240546/removing-html-from-a-java-string"&gt;stackoverflow&lt;/a&gt;. It involves downloading and importing a third party package (is javax third party?) that allows you to parse the HTML, and you need to be sure to set a somewhat obscure argument that will ignore all tags. This isn’t difficult, it’s just more work, and it gets in the way of my getting things done.&lt;/p&gt;
&lt;p&gt;Another example I came across in the same project is encoding and decoding JSON. Again, PHP has built in functions &lt;code&gt;json_encode&lt;/code&gt; and &lt;code&gt;json_decode&lt;/code&gt;. Java, again, you need to download and import third party packages.&lt;/p&gt;
&lt;p&gt;I’m not complaining. These aren’t deal breakers. I’m just very surprised. When I first began working with PHP, I didn’t really like the language (Have you ever created an anonymous function in PHP? And those dollar signs in front of variables, the hell?) But now I realize how much I’ve taken PHP for granted. &lt;em&gt;Web development with PHP is easy.&lt;/em&gt;&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2159823053</link><guid>http://steven.mlodzianoski.com/post/2159823053</guid><pubDate>Thu, 09 Dec 2010 19:55:32 -0500</pubDate><category>php</category><category>java</category><category>json</category></item><item><title>Browse Sad, A Last Resort Against IE6?</title><description>&lt;a href="http://browsesad.com/ "&gt;Browse Sad, A Last Resort Against IE6?&lt;/a&gt;: &lt;p&gt;I came across &lt;a href="http://browsesad.com/"&gt;Browse Sad&lt;/a&gt; the other day. Their goal is to get web developers grayscale their entire site (&lt;code&gt;filter:grayscale&lt;/code&gt;) for IE6 users, while asking them to upgrade their browser. I can empathize with them; IE6 prevents us developers from using all the great web stuff that have come out in the past 9 years. But I feel their approach is a bit aggressive.&lt;/p&gt;
&lt;p&gt;The following code will display a subtle message on the bottom of the browser asking the user to update to Google Chrome or Firefox. It’s small, and can be easily ignored, but is till noticable&lt;/p&gt;
&lt;pre&gt;&lt;!--[if lt IE 8]&gt;
&lt;div style="padding:0.5em; background-color:#ccc; border:1px solid #555; border-bottom:0px; position:fixed; bottom:0px; right:0px; z-index:9999;"&gt;
	&lt;strong&gt;Want a better browsing experience?&lt;/strong&gt;
	Upgrade to a modern web browser today, for Free!
	Download 
	&lt;a target="_blank" href="http://www.google.com/chrome/"&gt;Google Chrome&lt;/a&gt; 
	or 
	&lt;a target="_blank" href="http://www.mozilla.com/firefox/"&gt;Mozilla Firefox&lt;/a&gt;.
&lt;/div&gt;
&lt;![endif]--&gt;
&lt;/pre&gt;
&lt;p&gt;Another note about browsesad: They want &lt;strong&gt;you&lt;/strong&gt; to change your behavior because it’s inconveniencing &lt;strong&gt;me&lt;/strong&gt;. That’s not how you persuade people. You need to let them know why they will benefit from this action. It’s not that people are selfish, it’s just that you need to get their attention, and get them excited enough to take action.  And there are very strong reasons to upgrade your browser: better performance, better security, and more features.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2106871942</link><guid>http://steven.mlodzianoski.com/post/2106871942</guid><pubDate>Sun, 05 Dec 2010 08:00:07 -0500</pubDate><category>ie6</category><category>browsers</category></item><item><title>Mysterious Arguments </title><description>&lt;p&gt;Here’s a simple tip to make your code more readable. Suppose you have:&lt;/p&gt;
&lt;pre&gt;$things = get_stuff(50, 25, true);
&lt;/pre&gt;
&lt;p&gt;Unless you have the entire codebase memorized, you may not know what arguments are being passed into this function. But try this:&lt;/p&gt;
&lt;pre&gt;$things = get_stuff($start = 50,
                    $count = 25,
                    $include_soft_deletes = true);
&lt;/pre&gt;
&lt;p&gt;Now it’s much more clear. You’re getting 25 things, starting at the 50th in the list. And you also seem to be including things that have been soft deleted (marked as deleted, but not actually removed). In PHP, an assignment expression evaluates to the value being set, so the above is a shortcut. But for languages that don’t allow this, or for those of use who know better than to get too clever, the following is just as good.&lt;/p&gt;
&lt;pre&gt;$start = 50;
$count = 25;
$include_soft_deletes = true;
$things = get_stuff($start, $count, $include_soft_deletes);
&lt;/pre&gt;
&lt;p&gt;A more general rule is to never use a number (or any value) without “labeling” it, and you label it by assigning it to a variable with a descriptive name.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2101613783</link><guid>http://steven.mlodzianoski.com/post/2101613783</guid><pubDate>Sat, 04 Dec 2010 20:37:00 -0500</pubDate><category>readability</category><category>code</category></item><item><title>Internet Tip From My Mom</title><description>&lt;p&gt;I’m a professional web developer, and yet I learned this one from my Mom, which she read in Reader’s Digest Magazine.&lt;/p&gt;
&lt;blockquote&gt;In a url, everything to the left of an &lt;code&gt;@&lt;/code&gt; symbol is ignored.&lt;/blockquote&gt;
&lt;p&gt;For example, if you copy/past &lt;strong&gt;google.com@yahoo.com&lt;/strong&gt; into your url bar, you’ll be taken to Yahoo, not Google. Not a big deal, just be aware that the second url might be a spammer or con artist trying to make their url look like it’s from a legitimate source.&lt;/p&gt;
&lt;p&gt;This seems to be the case in all browsers. However, if the &lt;code&gt;@&lt;/code&gt; symbol appears to the right of the TLD, the domain is interpreted correctly.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2101355784</link><guid>http://steven.mlodzianoski.com/post/2101355784</guid><pubDate>Sat, 04 Dec 2010 20:12:00 -0500</pubDate></item><item><title>Towermadness, Endurance Tips and Tricks, the Reversal...</title><description>&lt;img src="http://26.media.tumblr.com/tumblr_lcxj7aRvq11qf9d66o1_r1_500.png"/&gt;&lt;br/&gt; Reversal Strategy Explanation&lt;br/&gt;&lt;br/&gt; &lt;img src="http://30.media.tumblr.com/tumblr_lcxj7aRvq11qf9d66o2_400.png"/&gt;&lt;br/&gt; Endurance: end game&lt;br/&gt;&lt;br/&gt; &lt;h1&gt;Towermadness, Endurance Tips and Tricks, the Reversal Strategy&lt;/h1&gt;
&lt;p&gt;If you’ve never played Towermadness, the rest of this post will make zero sense. Leave now. Or better yet, buy it for your iPhone/iPod Touch/iPad; it’s one of the best strategy games I’ve ever played.&lt;/p&gt;
&lt;p&gt;The map Endurance is crazy impossible to beat. It’s not the map that’s difficult, it’s the unending number of aliens they send at you: over 300 waves! But I’ll show you how to beat it! I don’t know if there’s a name for this strategy, but I’ll just call it &lt;strong&gt;The Reversal Strategy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Check out the first image above. Notice the tower layout, and notice there’s one, long winding path. If you’ve played the game at all, you’ve figured out the most basic strategy is to make the shortest path from the saucers to the sheep as long as possible in order to maximize shooting time. I’ve drawn the path out, half blue, and half purple. The blue path is that which the aliens will follow. But what’s up with the purple path? In the next image, notice the tower circled in red, just within the entrance to the sheep area. Suppose you delete it, and then rebuild it just one square to the right. What happens? &lt;strong&gt;The aliens turn around and head backwards! Yes, they’re retreating!&lt;/strong&gt; Ok, not really, but what’s really happened is you’ve changed the shortest path to the sheep so that they now need to loop all the way around the map again. They’ll backtrack through the blue path, and continue on to the purple. If they’ve survived long enough to get to the end of the purple path, simply toggle the tower in the sheep entrance again. Continue reversing until all aliens are destroyed.&lt;/p&gt;
&lt;p&gt;On this particular level, Endurance, I built a dozen fully upgraded flame throwers and a dozen nukes. I thought this was overkill (and it was for most of the game), but when the last boss aliens came around, I had to reverse back and forth many many times in order to kill them. It took several minutes kill the last ones. No matter how good of a maze you’ve built, and how much high powered weaponry you’ve built, it’s impossible to beat this level without the Reversal Strategy (if you can prove me wrong, I’d love to know how else to beat this level!)&lt;/p&gt;
&lt;p&gt;PS - If you’re wondering how to take screenshots on your iPod/iPhone, hold the home button and then press the power button. Then email the photo to yourself.&lt;/p&gt;</description><link>http://steven.mlodzianoski.com/post/2101170112</link><guid>http://steven.mlodzianoski.com/post/2101170112</guid><pubDate>Sat, 04 Dec 2010 19:52:35 -0500</pubDate><category>towermadness</category><category>strategy</category></item></channel></rss>

