<?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>I am Kevin Hamer, a
lead web engineer at iMarc.I make
websites,
run vim, XFCE, and Minecraft.
I try to contribute where I can.</description><title>BecauseRobots</title><generator>Tumblr (3.0; @khamer)</generator><link>http://becauserobots.com/</link><item><title>Just Relax: Why it's difficult to plan for scaling</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m44mb1eTlO1qigri6.png"/&gt;&lt;/p&gt;
&lt;p&gt;Diablo 3 was released yesterday, and the authentication servers in particular are having trouble keeping up with the load. Parts of the community are being supportive, but other parts are being obnoxious enough that I wanted to rant. So, here&amp;#8217;s the rant for any of you interested enough to read it.&lt;/p&gt;
&lt;p&gt;Computers are awesome at doing one thing at a time. That&amp;#8217;s all they did at first, we just figured out how to make them very efficient at switching between a lot of different tasks.&lt;/p&gt;
&lt;p&gt;The &amp;#8216;speed&amp;#8217; of a processor (say, 3 Gigahertz) refers to the clock rate of the processor. This doesn&amp;#8217;t exactly translate to how many instructions a processor can perform per second, but its closely related. (This is affected by other things, not the least of which is the architecture of the system itself.)&lt;/p&gt;
&lt;p&gt;These days, most home systems have multi-core processors. Here, each core can do its own instruction at the same time, So that unrelated &amp;#8216;tasks&amp;#8217; can be done in parallel. High end computers often have multiple processors, each which can have multiple cores. Something like the authentication system for Blizzard is almost certainly composed of multiple servers.&lt;/p&gt;
&lt;p&gt;Problems don&amp;#8217;t arise from CPUs not being fast enough or there not being enough servers.&lt;/p&gt;
&lt;p&gt;If you wanted to design a car to go 1000 miles per hour, you&amp;#8217;d might start by building a car that can go 10 mph and test it up to 100 mph. You&amp;#8217;d be able to see things like whether your engine keeping up or whether the wheels stayed attached, but you probably would never discover that at 300 mph, there&amp;#8217;s enough upward force generated by the air moving under the car that it&amp;#8217;ll lose traction and flip over. The point is, some problems, even with computers, you can&amp;#8217;t predict by simulating anything less than full load.&lt;/p&gt;
&lt;p&gt;Now pretend you&amp;#8217;re Blizzard. You have a new game with over 2 million pre-orders alone. Do you try to simulate a million people connected? How would you even know that you&amp;#8217;ve properly simulated a million computers, each with different hardware and operating systems in a way that&amp;#8217;s realistic? Or do you run betas and try to find all the serious issues with a hundredth of the real player base, and try to plan to scale from that?&lt;/p&gt;
&lt;p&gt;Lastly, remember that this login system isn&amp;#8217;t just returning a list of online/offline. Its loading up characters, progress, and even dealing with trying to verify your account is valid and paid for and you&amp;#8217;re not some kind of hacker trying to break into someone else&amp;#8217;s account.&lt;/p&gt;
&lt;p&gt;So, let them have some slack. It&amp;#8217;s a good game. If you have to, pretend that the real launch isn&amp;#8217;t for a week or two and play it then; there&amp;#8217;s no subscription you&amp;#8217;re wasting, you&amp;#8217;ll be able to play this game now as it is or you can wait for the fixes.  Either way, hopefully if you bothered to read all this it offered a little food for thought about why this is hard.&lt;/p&gt;</description><link>http://becauserobots.com/post/23195437910</link><guid>http://becauserobots.com/post/23195437910</guid><pubDate>Wed, 16 May 2012 20:01:58 -0400</pubDate></item><item><title>OAB-Java6 – running Oracle and 32-bit Java on 64-bit Ubuntu Systems</title><description>&lt;p&gt;This was a huge time saver, and was hard for me to find after the switch to OpenJDK, but it works great:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/oab-java6" target="_blank"&gt;&lt;a href="https://github.com/flexiondotorg/oab-java6" target="_blank"&gt;https://github.com/flexiondotorg/oab-java6&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Highly recommended. I needed this (well, didn&amp;#8217;t need but I have a GUI again) for Juniper Network Connect (along with &lt;a href="http://mad-scientist.us/juniper.html" target="_blank"&gt;the script on mad-scientist.us&lt;/a&gt;.)&lt;/p&gt;</description><link>http://becauserobots.com/post/23172794432</link><guid>http://becauserobots.com/post/23172794432</guid><pubDate>Wed, 16 May 2012 13:50:30 -0400</pubDate><category>ubuntu</category><category>java</category></item><item><title>Overload – customize your commands</title><description>&lt;p&gt;I just pushed &lt;a href="https://github.com/khamer/overload" target="_blank"&gt;Overload to GitHub&lt;/a&gt;. A development version (with even less documentation) was on Bitbucket for a while, but I had made changes and wanted to share the script where other people could find it. (Plus, hg-git has helped me be happier with using GitHub since I can keep the hg client, at least for now.)&lt;/p&gt;
&lt;p&gt;The philosophy behind overload really came down to namespacing and discoverability. Over time, I both write and accumulate scripts to perform various tasks. Often the scripts are very small, but other times, say, when I want to use &lt;a href="https://github.com/jeffturcotte/switch" target="_blank"&gt;my colleague&amp;#8217;s svn switch script&lt;/a&gt;, my &amp;#8216;path namespace&amp;#8217; was feeling cluttered. Overload is my way of being able to not necessarily keep everything in the path and group related actions together.&lt;/p&gt;
&lt;p&gt;My next goals for Overload would be to setup some better bash completion, so that it&amp;#8217;d be simple to define bash completion for functions that don&amp;#8217;t do that yet, or extend their completion to included any commands added through Overload.&lt;/p&gt;</description><link>http://becauserobots.com/post/23112208585</link><guid>http://becauserobots.com/post/23112208585</guid><pubDate>Tue, 15 May 2012 14:13:29 -0400</pubDate><category>linux</category><category>bash</category></item><item><title>Poor Code is Always Poor Code</title><description>&lt;p&gt;I just read an &lt;a href="http://sandofsky.com/blog/shell-apps.html" target="_blank"&gt;article written by Bejamin Sandofsky&lt;/a&gt; that I was sent by a friend that I wanted to respond to. So, here it is.&lt;/p&gt;
&lt;p&gt;Poor programming yields poor results, regardless of your language or platform. Some languages simply are not capable of certain kinds of functionality or have been extended poorly. I would never recommend trying to implement real time 3D graphics in HTML/Javascript. I can&amp;#8217;t imagine using Java to display content markup (at least not without some kind of embedded browser.) It is important to identify what you&amp;#8217;re trying to do and comparing it against the capabilities of what you&amp;#8217;re working with.&lt;/p&gt;
&lt;p&gt;I helped develop the &lt;a href="http://www.petwatch.net/about/mobile_app" target="_blank"&gt;PetWatch Mobile App&lt;/a&gt; at iMarc, which ended up in the app store five or so months ago. Before beginning development, we looked at Sencha, PhoneGap, Titanium, as well as developing in Objective-C. We were interested in other platforms, but were only targeting iOS. We chose PhoneGap.&lt;/p&gt;
&lt;p&gt;It isn&amp;#8217;t perfect; I certainly could have spent a lot more time going through and polishing up transitions, working on Android support, and adding multi-touch support. Still, I am happy how the UI interactions turned out.&lt;/p&gt;
&lt;p&gt;I spent a lot of effort making sure to get the interface for manipulating animals to work as I hoped, using CSS3 and JavaScript to allow me to rotate and scale animals simultaneously around their far corners. The end result feels natural enough that it doesn&amp;#8217;t really require explanation to use.&lt;/p&gt;
&lt;p&gt;I also spent some time focused on the tray at the bottom that animals and borders are chosen from. I wanted to be able to emulate that iOS style tray that native applications use, and even went as far as to duplicate momentum.&lt;/p&gt;
&lt;p&gt;I do agree with Sandofsky that one of the worst parts of developing this mobile app was dealing with PhoneGap. I did end up writing some Objective-C, either tracing bugs or extending plugins to be able to account for the minor, system level integration we needed to send emails with attachments or access the camera. However, that&amp;#8217;s about the extent to which I&amp;#8217;ll agree with him.&lt;/p&gt;
&lt;p&gt;We did run into one issue with how HTML5 was implemented on Android, however that was it to speak of. For this kind of development, we could target solely webkit-based mobile devices, and there were almost no differences. There was an issue where 2.3 Android didn&amp;#8217;t implement the HTML5 Canvas elements toDataURI method at all. We also noticed a huge difference in the number of touch events triggered on an iPhone and on Android. The iPhone 4, for example, triggered nearly twice as many events per second during a drag event than an equivalent Android phone like the Motorola Droid 3 or even EVO 3D. This allows motions on the iPhone to be tracked much more accurately, which not only helps with animating dragging more smoothly, but also made calculating momentum much more accurate.&lt;/p&gt;
&lt;p&gt;Without devolving too far into a rant against Apple here, I think the belief that there&amp;#8217;s a single convention that all native mobile applications follow is ridiculous. After reviewing a number of UIs as we designed the layout for PetWatch Mobile, we found top tabs and bottom tabs. We found paged trays and weighted trays. We found some conventions for some symbols, but also found lots of applications that simply used their own. Certainly once we looked cross-platform, we found even the same app on different platforms would use significantly different layouts and conventions.&lt;/p&gt;
&lt;p&gt;We all seemed to agree that we had chosen the right behaviors, even if we weren&amp;#8217;t sure on all of the influences. Certainly details like the back/next buttons on the top right and left are trying to match an iOS pattern. I&amp;#8217;m not sure if I&amp;#8217;ve found anything I&amp;#8217;d credit as the source for teaching me that scale and rotate should happen simultaneously around the far corner, but even through user testing that was clearly the right approach.&lt;/p&gt;
&lt;p&gt;While I understand that Sandofsky was primarily attacking shell apps, all of the platforms we looked at implemented a way to do some kind of local storage without any issue. Even with only HTML5, local storage was available. We&amp;#8217;ll use the app store to deliver new content, as we can release content as quickly as we want and still allow users to get updates at their own pace without any risk to mixing versions.&lt;/p&gt;
&lt;p&gt;Lastly, HTML5 is easier. I&amp;#8217;ve written Java and worked with Eclipse/Equinox as well as SWT, written Objective-C, and written lots of HTML. While I might be able to create basic interfaces just as easily with any of these, the development cycle is much slower for design outside of the web. Recompiling the PhoneGap app and installing it, even on an emulator, took significantly longer than developing in a browser where I had much richer development tools like Inspector and Firebug. 90% of the PetWatch Mobile application was developed in browsers without any PhoneGap dependencies.&lt;/p&gt;
&lt;p&gt;Most importantly, the copy, look, feel and images all could be developed in browsers by web designers without a Java/Objective-C developer to get in the way. While Sandofsky or I may be capable of creating frontends using these other languages, now any designer who wants to actively develop the user interface is really at the mercy of developers. I expect that this is often what leads to such poor UI design on low budget or open source native applications, where the time and budget given or for a project just simply can&amp;#8217;t afford the number of iterations that would be required to get to the same quality of design that most web applications or web sites do.&lt;/p&gt;
&lt;p&gt;One of my favorite applications to mention in this context is &lt;em&gt;&lt;a href="http://na.leagueoflegends.com/" target="_blank"&gt;League of Legends&lt;/a&gt;&lt;/em&gt;, a independently developed computer game first released in 2009. Reported (at least at this time) to have over 500,000 concurrent players, 32 million registrations, and doubling its player base every four months, Riot Games seems to be doing quite well. (&lt;a href="http://euw.leagueoflegends.com/news/community-grows-32-million-players" target="_blank"&gt;1&lt;/a&gt;, &lt;a href="http://www.neutralcreeps.com/2011/07/league-of-legends-peaks-at-500000.html" target="_blank"&gt;2&lt;/a&gt;.) And, the game&amp;#8217;s out-of-game UI is Flash/Flex based.&lt;/p&gt;
&lt;p&gt;The out-of-game UI (the UI you use while outside of any match to chat, view profiles, purchase in game content and form groups) is one of my favorite UI designs I&amp;#8217;ve encountered. While It certainly could use some tweaks here and there, it acts exactly how I&amp;#8217;d want it to behave: like any other window.&lt;/p&gt;
&lt;p&gt;Especially on the desktop, we&amp;#8217;re used to having windows that act like windows, hyperlinks, the ability to minimize or resize, etc. Most games simply take over the monitor, filling it from edge to edge with whatever art they can up with, even if there&amp;#8217;s nothing deserving this attention going on. &lt;em&gt;League of Legends&lt;/em&gt; acts more politely; switching to fullscreen when the content demands it, and being a unobtrusive, light weight Flash/Flex app the rest of the time.&lt;/p&gt;
&lt;p&gt;Most poor applications these days aren&amp;#8217;t poor because they&amp;#8217;re written in Java, HTML, or Objective-C; they&amp;#8217;re poor because they&amp;#8217;re written poorly. Even most speed issues that people run into with performance isn&amp;#8217;t because any of these technologies in inherently incapable of not running fast enough, but because there&amp;#8217;s usually flaws in design which cause things to run excessively or redundantly. Scripting languages from Python through Ruby through even HTML/CSS/JavaScript are more concise, often easier to read, and therefore are usually easy to audit for unnecessary looping or excessive constructions. Lower level languages like Objective-C, Java, or C# will always be faster when you really do need to find a way to execute a function as fast as possible, but that&amp;#8217;s why extensions to most scripting languages are written in these. Projects like Jython are trying to integrate the two together so each can be used where appropriate. Still, 95% of the time, the code we&amp;#8217;re writing, especially for mobile apps, isn&amp;#8217;t about the speed of execution; its about making sure we have readable, maintainable code that&amp;#8217;s cheap to update and quick to audit.&lt;/p&gt;
&lt;p&gt;The only way poor code gets better is being accessible, easy to share, and easy to follow. Choosing Objective-C so you&amp;#8217;re poor code can be executed slightly faster isn&amp;#8217;t the solution; writing your code well enough you can figure out what&amp;#8217;s wrong with it is.&lt;/p&gt;</description><link>http://becauserobots.com/post/22694154397</link><guid>http://becauserobots.com/post/22694154397</guid><pubDate>Tue, 08 May 2012 22:30:58 -0400</pubDate></item><item><title>Why you should be using Bash Parameter Expansion</title><description>&lt;p&gt;One of the less commonly used parts of Bash is its parameter expansion. It allows you perform simple string operations on variables without affecting them. For example,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; for F in *.jpeg; do mv $F ${F%.jpeg}.jpg; done &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Will find and rename all of your .jpeg files to .jpg files. There are ways to chop off bot suffixes and prefixes, as well as replace strings. For example, I could have used this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; for F in *.jpeg; do mv $F ${F/%jpeg/jpg}; done &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bash Patter Matching syntax is very powerful, although it differs a lot from PCRE and most other regular expressions. For parameter expansion, the &amp;#8216;%&amp;#8217; after the first slash is forcing the pattern matched to be at the end of the string, so even a filename like cool-jpeg-I-wanted-to-share.jpeg would get renamed properly.&lt;/p&gt;</description><link>http://becauserobots.com/post/22618716015</link><guid>http://becauserobots.com/post/22618716015</guid><pubDate>Mon, 07 May 2012 20:01:54 -0400</pubDate><category>bash</category><category>linux</category></item><item><title>Unfiltered</title><description>&lt;p&gt;I liked social media more when people only used to talk about themselves. I joined Facebook in October 28, 2004; seven and half years ago. Back then, Facebook pretty much was for sharing links to newfangled websites &amp;#8220;YouTube&amp;#8221; or telling the world whether you broken up with your boyfriend. Now, Facebook seems to be inundated with media to try to change my opinion, and it&amp;#8217;s time we stopped. Here&amp;#8217;s my opinions, which I&amp;#8217;ve tried to make as &amp;#8216;opt-in&amp;#8217; as possible.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Today&amp;#8217;s politics are more about manipulating others than working towards the future. Nothing seems too promising, but at the moment, Obama seems to be trying out some new tactics which at the minimum, are changing the game, probably for the better.&lt;/li&gt;
&lt;li&gt;Today&amp;#8217;s religions are more about maintaining influence than improving the world. I think there are inherent flaws in taken ancient texts literally; it&amp;#8217;d be equivalent to interpreting Beowulf to mean we should all be hunting dragons. Further, even if a higher power existed, they would want us to prove that we were capable of independent thought and reasoning, just as a parent would wish that their children would be capable of making their own decisions.&lt;/li&gt;
&lt;li&gt;Today&amp;#8217;s morals are more about political or religious motives than quality of life. Today&amp;#8217;s moral issues like stem cell research, privacy, or abortion are so obfuscated by other topics that actual discussion about what&amp;#8217;s best for humanity is out of the question, even if these are the topics that should be the most important to us.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;To be clear, I don&amp;#8217;t care if you have opinions different than mine, or that you support or share them, but we need some moderation. Facebook is swamped with these kinds of opinions and I find that I tune Facebook out as much as I tune out mainstream media. I have as much interest in what some friends post to Facebook as I do with what news story CNN or Fox just added to their ticker.&lt;/p&gt;
&lt;p&gt;I think the core issue is that its easier to tell other people to care than to care yourself. It&amp;#8217;s easier to tweet than donate. It&amp;#8217;s easier to post to Facebook than it is to vote. Social media is devolving into either attacking or defending how other people should live, drowning out any meaningful communication left.&lt;/p&gt;
&lt;p&gt;Because there is no &amp;#8216;Filter Politics&amp;#8217; option on Facebook. I can only choose to filter everything you say. Next time you decide to repost some witty pro-choice article or heart-warming story of God Saves, think about whether the people you&amp;#8217;re sending this will care.&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t resend chain emails to everyone in your address book without thinking. I guarantee that if you spent less than 10 seconds thinking about what you&amp;#8217;re doing, I&amp;#8217;m going to spend less than 10 seconds paying attention to anything you say. Eventually, if you do it too often, I&amp;#8217;ll find a way to not pay attention to anything you say.&lt;/p&gt;
&lt;p&gt;Believe anything you&amp;#8217;d like. Support it through actions or donations as strongly as you feel and are capable. Publicize it only when you&amp;#8217;d spent time thinking about what you&amp;#8217;re going to publish. Otherwise, when you do cry wolf, no one will care either.&lt;/p&gt;</description><link>http://becauserobots.com/post/21191283548</link><guid>http://becauserobots.com/post/21191283548</guid><pubDate>Sun, 15 Apr 2012 22:48:00 -0400</pubDate><category>politics</category><category>religion</category></item><item><title>More Site Design</title><description>&lt;p&gt;So, I&amp;#8217;ve continued to tweak this Tumblr skin. I&amp;#8217;m reworked my navigation, improved the footer (and added footer navigation), and added media queries to load different styles for small screens and mobile. The site should function (albeit that there&amp;#8217;s a lot of JavaScript errors from SHJS in ie8 and lower) as far back as IE6 without being entirely broken, and gracefully improve all the way up. Since the mobile site relies on media queries, you won&amp;#8217;t see the thinner version by resizing your browser unless you&amp;#8217;re running at least IE9 (or Chrome/Safari/Opera/Firefox.)&lt;/p&gt;
&lt;p&gt;Any opinions about the new look would be most appreciated.&lt;/p&gt;</description><link>http://becauserobots.com/post/21186215666</link><guid>http://becauserobots.com/post/21186215666</guid><pubDate>Sun, 15 Apr 2012 21:31:00 -0400</pubDate><category>redeisgn</category></item><item><title>Remapping Caps-lock from a Terminal</title><description>&lt;p&gt;After playing around with xmodmap and some other programs, I finally found setxkbmap which allows you set an XKB setting. There&amp;#8217;s loads of settings (for me, they&amp;#8217;re all listed in /usr/share/X11/xkb/rules/xorg.lst) but here&amp;#8217;s some highlights:&lt;/p&gt;
&lt;p&gt;Make caps-lock into a&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;control key: &amp;#8220;ctrl:nocaps&amp;#8221;&lt;/li&gt;
&lt;li&gt;control key, and the control key into caps: &amp;#8220;ctrl:swapcaps&amp;#8221;&lt;/li&gt;
&lt;li&gt;escape key: &amp;#8220;caps:escape&amp;#8221;&lt;/li&gt;
&lt;li&gt;super (windows/command) key: &amp;#8220;caps:super&amp;#8221;&lt;/li&gt;
&lt;li&gt;compose key: &amp;#8220;compose:caps&amp;#8221;&lt;/li&gt;
&lt;li&gt;make caps-lock do nothing: &amp;#8220;caps:none&amp;#8221;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;To run of of these, use setxkbmap like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;setxkbmap -option "caps:super"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;#8217;s all there is to it.&lt;/p&gt;</description><link>http://becauserobots.com/post/20848513130</link><guid>http://becauserobots.com/post/20848513130</guid><pubDate>Tue, 10 Apr 2012 13:11:00 -0400</pubDate></item><item><title>Using JavaScript to create JavaScript-less, CSS Animations</title><description>&lt;p&gt;First off, demos: you can see a nice, webkit-only jsFiddle of a &lt;a href="http://jsfiddle.net/FgYeP/1/" target="_blank"&gt;slideshow&lt;/a&gt; or of a &lt;a href="http://jsfiddle.net/XKvXQ/1/" target="_blank"&gt;ticker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that this isn&amp;#8217;t widely useful yet, as CSS animations aren&amp;#8217;t widely supported. Still, I thought it was worth pointing out this logical difference.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" src="http://jsfiddle.net/FgYeP/1/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;I created some &lt;a href="http://jsfiddle.net/FgYeP/1/" target="_blank"&gt;simple &amp;#8216;slideshow&amp;#8217; style animations&lt;/a&gt; but unlike most, JavaScript execution stops entirely after running through once.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" src="http://jsfiddle.net/XKvXQ/1/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Similarly, I made a&lt;a href="http://jsfiddle.net/XKvXQ/1/" target="_blank"&gt; &amp;#8216;ticker&amp;#8217; that stops moving on hover&lt;/a&gt;, that&amp;#8217;s created by running JavaScript once, and using only CSS for the animations (even the pausing.)&lt;/p&gt;</description><link>http://becauserobots.com/post/18159906964</link><guid>http://becauserobots.com/post/18159906964</guid><pubDate>Thu, 23 Feb 2012 20:03:00 -0500</pubDate><category>css</category><category>javascript</category><category>coding</category></item><item><title>The New Keyboard Layout is in Progress</title><description>&lt;p&gt;I&amp;#8217;d say, all things considered, I&amp;#8217;m probably two or three days away from ordering my custom keycaps. Almost all the buttons are there and I&amp;#8217;m really just culling the worst of them and trying to come up with even better ones. My second Leopold did arrive, so I have that now. I also let &lt;a href="http://twitter.com/bratling" target="_blank"&gt;@bratling&lt;/a&gt; (who I work with) try the keyboard out, and he&amp;#8217;s thinking about ordering one in the next month or so, though perhaps with browns.&lt;/p&gt;
&lt;p&gt;I did hear back from WASD Keyboards that I could get a full set of custom keys easily enough, so everything seems in order. I am not sure if I will order both sets of keys immediately or not; I&amp;#8217;ll have to wait and see what happens. After reviewing a number of fonts, I think I&amp;#8217;m going to use &lt;a href="http://www.impallari.com/terminaldosis" target="_blank"&gt;Terminal Dosis&lt;/a&gt; for the lettering since its one of the best free fonts I could find that really had the right kind of retro feel to it.&lt;/p&gt;</description><link>http://becauserobots.com/post/18138324795</link><guid>http://becauserobots.com/post/18138324795</guid><pubDate>Thu, 23 Feb 2012 13:33:00 -0500</pubDate><category>keyboards</category></item><item><title>Custom Keyboard Keycaps</title><description>&lt;p&gt;Just bought myself a second &lt;a href="http://elitekeyboards.com/products.php?sub=leopold,tenkeyless&amp;amp;pid=fc200rlab" target="_blank"&gt;Leopold keyboard&lt;/a&gt; to match the one I have at work (tenkeyless, Cherry MX Black keyswitches.) I thought very heavily about getting a WASD keyboard instead, but decided that I&amp;#8217;d rather have two matching keyboards instead.&lt;/p&gt;
&lt;p&gt;&lt;img height="325" src="http://www.wasdkeyboards.com/media/customdesign01.jpg" width="560"/&gt;&lt;/p&gt;
&lt;p&gt;After seeing on&lt;a href="http://www.wasdkeyboards.com/index.php/blog/custom-layouts/" target="_blank"&gt; WASD&amp;#8217;s blog&lt;/a&gt; what they can do with custom keycaps, I sent off an email to see if I can&amp;#8217;t work something out to get a set or two for my Leopolds. Hopefully&amp;#8230;&lt;/p&gt;</description><link>http://becauserobots.com/post/17649304071</link><guid>http://becauserobots.com/post/17649304071</guid><pubDate>Wed, 15 Feb 2012 02:24:25 -0500</pubDate><category>keyboards</category></item><item><title>More tweaks and a long weekend</title><description>&lt;p&gt;I&amp;#8217;ve gone back through and retagged most posts for consistency, as well as made some more minor changes to the look. I got &lt;a href="http://softwaremaniacs.org/soft/highlight/en/" target="_blank"&gt;highlight.js&lt;/a&gt; working once again, which was one of the biggest reasons I ditched Posterous. I even went through and hacked together a custom theme for highlight.js based upon my &lt;a href="http://www.vim.org/scripts/script.php?script_id=3689" target="_blank"&gt;ambient&lt;/a&gt; color scheme for vim. It might not be perfect, but its certainly better than nothing.&lt;/p&gt;
&lt;p&gt;I also spent some time this weekend working with &lt;a href="https://github.com/gmarik/vundle" target="_blank"&gt;Vundle&lt;/a&gt;, which is a bundle/addon/script manager for vim that has a few features that pathogen doesn&amp;#8217;t; most importantly, a way to search for them, install them, and keep them up to date. I&amp;#8217;ll probably right up my thoughts on that in a separate article though.&lt;/p&gt;
&lt;p&gt;Other minor things: switched to Ubuntu&amp;#8217;s font instead of using Roboto, as I found it looks better and has more the style I wanted to go with. Also, discovered that upgrading VirtualBox can be dangerous if you have any virtual machines in a saved state; it completely corrupted mine and I had to make a new one.&lt;/p&gt;</description><link>http://becauserobots.com/post/17535237963</link><guid>http://becauserobots.com/post/17535237963</guid><pubDate>Sun, 12 Feb 2012 23:10:21 -0500</pubDate></item><item><title>It's a new look</title><description>&lt;p&gt;So, I&amp;#8217;d say the new look for Because&lt;em&gt;Robots&lt;/em&gt; is probably about&amp;#8230; 80% complete now. This is probably the third major revision of the new look, which is inspired by Android&amp;#8217;s style guide and &lt;a href="http://developer.android.com/design/style/themes.html" target="_blank"&gt;Holo Dark&lt;/a&gt;. While a lot of Android&amp;#8217;s style guide is clearly oriented for touch devices, I wanted to steal some of the look and feel. They are no where near as detailed or thorough as Apple&amp;#8217;s (&lt;a href="http://developer.android.com/design/style/themes.html" target="_blank"&gt;PDF&lt;/a&gt;), but I&amp;#8217;m glad to at least see Android taking steps to unify the platform&amp;#8217;s appearance and make the experience more cohesive overall.&lt;/p&gt;
&lt;p&gt;After going through this process a number of times, I did end up starting with typographical styles and building &amp;#8220;mobile first&amp;#8221; styles and then worried about any tweaks I needed to make to the layout to look better on desktops. Part of the last 20% that I haven&amp;#8217;t done is probably switching the font sizes based upon my guesses at pixel density. I did some of the work for this for the &lt;a href="http://itunes.apple.com/us/app/petwatch/id489647067?mt=8" target="_blank"&gt;PetWatch&lt;/a&gt; app, but there I had the added benefit of exclusively targeting the iPhone 3GS, iPhone 4, and iPhone 5. In he wild, I&amp;#8217;ll have to guess screen sizes, whereas I could treat all platform screens as having the same physical size.&lt;/p&gt;
&lt;p&gt;I think the real solution will be a way to actually specify layout/sizes in better units than pixels. Android calls them density-independent pixels (dp) and scale-independent pixels (sp), which are terrible names.&lt;/p&gt;
&lt;p&gt;In spirit, a dp is a &amp;#8216;replacement&amp;#8217; for pixels, and what Apple (and others) secretly pretend pixels are based upon meta tags. a 1dp thick line is meant to be a (more or less) the thinnest line that can be displayed on the screen, even if that means being 2 physical pixels thick. This probably what should be used for defining borders and other UI elements.&lt;/p&gt;
&lt;p&gt;In contrast, a sp is another &amp;#8216;replacement&amp;#8217; for pixels, identical to dp except that sp scale with the user&amp;#8217;s zoom preference. So, I&amp;#8217;d expect that images and other content should probably use sp&amp;#8217;s for dimensions.&lt;/p&gt;
&lt;p&gt;Anyway, this version of the site doesn&amp;#8217;t use that (at least not yet.) Maybe I&amp;#8217;ll sweep through and change over.&lt;/p&gt;</description><link>http://becauserobots.com/post/17302870453</link><guid>http://becauserobots.com/post/17302870453</guid><pubDate>Wed, 08 Feb 2012 22:50:27 -0500</pubDate><category>mobile</category><category>redesign</category></item><item><title>Energy Drinks Ordered by Taste</title><description>&lt;p&gt;A week or so ago, we bought a number of energy drinks for the office to see which ones we liked. Here&amp;#8217;s the order from best to worst taste. For reference, I think most soda would fall around a 2 or 2.5 on this scale for me.&lt;/p&gt;
&lt;ol&gt;&lt;h3&gt;Energy Drinks by Taste&lt;/h3&gt;
&lt;li&gt;Rockstar Black (Double Strength) - tasty, good kick. I know that I also like the white (sugar free) ones as well, but we didn&amp;#8217;t get those for the office yet.&lt;/li&gt;
&lt;li&gt;Red Bull - tastes like Spree candy in a good way.&lt;/li&gt;
&lt;li&gt;Monster - not bad a little more bite than most like.&lt;/li&gt;
&lt;li&gt;Moxie - tastes like lemon juice and bug juice like you&amp;#8217;d get at camp.&lt;/li&gt;
&lt;li&gt;Full Throttle - like if you melted down skittles and mixed them with sprite.&lt;/li&gt;
&lt;/ol&gt;</description><link>http://becauserobots.com/post/17219385405</link><guid>http://becauserobots.com/post/17219385405</guid><pubDate>Tue, 07 Feb 2012 14:32:00 -0500</pubDate><category>caffeine</category><category>food</category></item><item><title>Vintage Mode in Sublime Text</title><description>&lt;p&gt;Will is one of my colleague at iMarc, and an avid Sublime Text 2 user. He&amp;#8217;s written a number of plugins for it now, and every once in a while vintage mode comes up.&lt;/p&gt;
&lt;p&gt;Vintage mode is an &amp;#8216;official&amp;#8217; plugin that&amp;#8217;s bundled with ST2 itself which tries to add many vi behaviors to ST2. The first couple times I tried it, I found short comings within 2-3 minutes and this time it took 5, so it&amp;#8217;s slowly getting better. Anyone who had used vi or vim (or gvim/macvim) for a while will probably notice these.&lt;/p&gt;
&lt;p&gt;These are all command mode or visual mode commands, as that&amp;#8217;s all Vintage mode claims to affect. There&amp;#8217;s certainly a number of ex and insert commands which I would sorely miss as well.&lt;/p&gt;
&lt;p&gt;The lists below are by no means exhaustive, just commands that I use fairly often and recalled from memory.&lt;/p&gt;
&lt;ul&gt;&lt;h3&gt;Vim Left-Right Motions&lt;/h3&gt;
&lt;li&gt;h, l (left and right) - already found differences. h and l don&amp;#8217;t &amp;#8216;wrap&amp;#8217; around the beginning and the end of the line in vim, and in Sublime, they do. If you think this is an irrelevant difference, think of using multi-selections to edit a bunch of lines at once. vim is very mindful of what commands will cause line changes and which ones won&amp;#8217;t, and I think this ties into making sure that macros are more robust or degrade more smoothly.&lt;/li&gt;
&lt;li&gt;0, ^, $ (first character, first non-blank character, last  character) - these all seem to be consistent.&lt;/li&gt;
&lt;li&gt;g^, g$ (first character of the visual line, last character of the visual line) - these don&amp;#8217;t seem to exist. It&amp;#8217;s interesting that Sublime implemented the &amp;#8216;true&amp;#8217; line operations here and didn&amp;#8217;t implement the visual line operations, whereas in other places, Jon did the opposite.&lt;/li&gt;
&lt;li&gt;f{char}, F{char}, t{char}, T{char} (go to the next/previous character, go up to the next/previous character) - these all seem to be working correctly.&lt;/li&gt;
&lt;li&gt;; and , (repeat last f, F, t, or T command) - all seem to work.&lt;/li&gt;
&lt;li&gt;{column}| (goes to column {column} in the current line) - not implemented.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;h3&gt;Line Motions&lt;/h3&gt;
&lt;li&gt;j, k (up and down) - in vim, j and k do their best to move to the same column in the previous line. In Sublime, j and k move to the same visual column and may only change visual lines. The &amp;#8216;visual line down&amp;#8217; and &amp;#8216;visual line up&amp;#8217; commands do exist in vim too, they&amp;#8217;re just gj and gk respectively.&lt;/li&gt;
&lt;li&gt;gg, G (first line and last line) - seem to work.&lt;/li&gt;
&lt;li&gt;+, - (goes to first character of next/previous line) - don&amp;#8217;t exist.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;h3&gt;Word Motions&lt;/h3&gt;
&lt;li&gt;w, W, b, B - these all seem consistent. For those that don&amp;#8217;t know, w moves your caret to the next first character of a word (like ctrl-right/cmd-right.) Similarly, b moves your caret to the previous first character of a word. W/B are nearly the same, but they work on WORDs instead of words, where a WORD in vim is a string of any non-whitespace characters.&lt;/li&gt;
&lt;li&gt;e, E, ge, gE - these are very similar to w/W/b/B, but instead of going to the first character, they go to the last character of a word or WORD. e/E seem to work fine, but it looks like Sublime is lacking ge or gE entirely.&lt;/li&gt;
&lt;li&gt;cw/cW - this is an inconsistency in vim (maybe even a bug originally), where cw should have included the space(s) after the current word, but instead, cw and cW were changed to behave identically to ce and cE. All things considered, its extremely rare that anyone would have actually wanted the correct behavior, but it is still a little strange, as similar commands like dw and vw do not behave the same as de and vw. Still, Sublime decided to implement this to be consistent with vim, so all is well.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;h3&gt;Text Selection&lt;/h3&gt;
&lt;li&gt;viw,vaw,vaW,viW (select word/WORD without or with whitespace) - these seem to work.&lt;/li&gt;
&lt;li&gt;vit, vat (select inside tag, inside tag and tag) - these don&amp;#8217;t seem to be implemented.&lt;/li&gt;
&lt;li&gt;vi&amp;#8217;, va&amp;#8217;, vi&amp;#8221;, va&amp;#8221; (select inside single/double quotes without or wite whitespace) - these seem to work.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I didn&amp;#8217;t test clipboard/registers very much, but I did want to note that while it appears that dd (delete line) works fine, pasting the line back doesn&amp;#8217;t correctly preserve newlines. ddp should just swap two lines, whereas in sublime I have to ddpi&amp;lt;enter&amp;gt;&amp;lt;esc&amp;gt;. Another nicety would be for Vintage mode to change some global keybings, like &amp;lt;ctrl-r&amp;gt; to redo.&lt;/p&gt;</description><link>http://becauserobots.com/post/16647755239</link><guid>http://becauserobots.com/post/16647755239</guid><pubDate>Sat, 28 Jan 2012 14:10:00 -0500</pubDate><category>sublimetext</category><category>vim</category><category>editor-wars</category></item><item><title>Bring skates.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_ly2x4aswsY1qkn0vno1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Bring skates.&lt;/p&gt;</description><link>http://becauserobots.com/post/16156052984</link><guid>http://becauserobots.com/post/16156052984</guid><pubDate>Thu, 19 Jan 2012 23:14:00 -0500</pubDate><category>Newburyport</category><category>weather</category></item><item><title>It's in Progress</title><description>&lt;p&gt;Just wanted to let everyone know that my tumblr theme redesign is in progress, so the site probably looks messy at best. I&amp;#8217;m trying out some fun things, like jQuery Masonry, to try to get a unique style that isn&amp;#8217;t too terrible.&lt;/p&gt;
&lt;p&gt;Also, I&amp;#8217;m trying to make sure all my fonts are bigger so the site is easier to read, and trying to update the font. Right now I&amp;#8217;m playing around with Segoe UI and Segoe UI Light, but I may also try something more interesting.&lt;/p&gt;
&lt;p&gt;Anyway, thanks for the patience.&lt;/p&gt;</description><link>http://becauserobots.com/post/16047003696</link><guid>http://becauserobots.com/post/16047003696</guid><pubDate>Tue, 17 Jan 2012 23:12:00 -0500</pubDate><category>redesign</category></item><item><title>'Disabling' the F-Lock key on Logitech SetPoint Keyboards</title><description>&lt;p&gt;It took way too much Googling to find this obvious, simple solution, so I figured I&amp;#8217;d post it to BR where it&amp;#8217;ll hopefully be easier to find.&lt;/p&gt;
&lt;p&gt;In SetPoint, under My Keboard, Keyboard F Key Settings (the F in a box on the left) you can select what all the F keys do when F-Lock is on. Just go through and change each to Keystroke Assignment and assign them to their respective function key. While this doesn&amp;#8217;t disable F-Lock at all, it merely makes the function keys behave the same regardless of whether F-Lock is on. This works perfectly with my old diNovo Media Desktop keyboard that I use for gaming.&lt;/p&gt;</description><link>http://becauserobots.com/post/15835020017</link><guid>http://becauserobots.com/post/15835020017</guid><pubDate>Sat, 14 Jan 2012 12:55:00 -0500</pubDate><category>logitech</category><category>keyboards</category></item><item><title>nslookup cobblestone</title><description>&lt;p&gt;I am overtired and going to sleep now and wanted to share how I figured this out.&lt;/p&gt;
&lt;p&gt;While playing Minecraft, my mind started to dream anyway, and I dreamt that there was some kind of DNS issue into of Minecraft, and I was confused because I wasn&amp;#8217;t sure how I figured out there was a DNS issue as I didn&amp;#8217;t see any trace routes or text on the screen. It was very confusing; I &lt;/p&gt;
&lt;p&gt;Good night.&lt;/p&gt;</description><link>http://becauserobots.com/post/15713733313</link><guid>http://becauserobots.com/post/15713733313</guid><pubDate>Thu, 12 Jan 2012 01:27:00 -0500</pubDate><category>minecraft</category><category>dreams</category></item><item><title>PHP: Joining arrays into subsets</title><description>&lt;p&gt;The following snippet joins the elements of an array into of subgroups of 3 (and one for the remainder.) I used this for grouping list items into columns for formatting, if it helps, enjoy.&lt;/p&gt;
&lt;pre&gt;&lt;code class="php"&gt;$x = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight');
for ($i=0; $i&amp;lt;count($x); $i++) {
    array_splice($x, $i, 3, join(array_slice($x, $i, 3)));
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Creates&lt;/p&gt;
&lt;pre&gt;&lt;code class="php"&gt;array(3) {
  [0]=&amp;gt;
  string(11) "onetwothree"
  [1]=&amp;gt;
  string(11) "fourfivesix"
  [2]=&amp;gt;
  string(10) "seveneight"
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By the way, apologies for the crappy formatting for code snippets; I&amp;#8217;m working on a new style for BecauseRobots which should also address that.&lt;/p&gt;</description><link>http://becauserobots.com/post/15685157286</link><guid>http://becauserobots.com/post/15685157286</guid><pubDate>Wed, 11 Jan 2012 16:21:00 -0500</pubDate><category>php</category><category>coding</category></item></channel></rss>

