Linux is Magic

Any sufficiently advanced technology is indistinguishable from magic.
–Arthur C. Clarke

It has been entirely too long since I last ranted about how truly amazing Linux is. I have three different problems in the last 24 hours that all resolved themselves via a fairly simple Linux hack. There is some of links that were useful for resolving my problems:

  • Convert MS/Word to PDF OpenOffice/LibreOffice macro for automated doc to pdf conversion. Use a simply bash script to use call the macro without starting a GUI instance of oowriter.
  • wvWare & antiword — More examples of MS Word command line processing.
  • testdisk — Boot-able Linux CD Rom for fixing broken partition tables, corrupted MBRs, and recovering lost files.  I used to have to do this by hand with fdisk but testdisk makes it MUCH MUCH easier!
  • Repair Broken Grub Multi-boot — Stupidly simply tutorial for using Yast to repair a broken Grub install on OpenSuse.  Includes information on fixing the Windows boot options for Grub as well.
  • zipsplit — Got a zip file too large to upload/transfer/email?  Use zipsplit to split the zip file into multiple files base on size.  Careful, the size is specified in bytes so a 300mb files would be split like zipsplit -n 300000000 myfile.zip.  BTW it is significantly FASTER than re-zipping a file or even unzipping a file.

If you can prove you don’t need it

For years, I have watched the number of technology companies that operate without debt.  The trend has always been popular among IT/IS companies because of the fundamental instability of intellectual property over hard assets.  The logic is hard to argue with.  If everything you “own” of value only has value as a direct cause of its perceived importance, then a shift of public perception doesn’t just hurt your brand, but fundamentally devalues your property.

Think of it this way; if tomorrow everyone stopped trusting Google for their search results (say, you know, someone found out their code sent all our personal information to the Chinese) then overnight they could loose 95% of their US market share.  How much is Google’s code-base worth at that point?  Currently Google is trading at 183 billion so a 95% loss in usage would probably translate to a market value somewhere south of 3-5 billion.

Physical assets don’t behave the same way.  1,000,000 lbs of steal doesn’t just loose 98% of its value overnight.  Even in heavily over-inflated markets things like… I don’t know… homes, don’t loose 98% of their value.  People may be upset that their 350,000 home is now worth 260,000 but just image if one NIGHT your $350,000 home was worth $7,000.  THAT is the danger for companies whose primary assets are intellectual property.

I will give you another concrete example.  Once upon a time there was a company who made A LOT of money in the energy trading business.  Basically the company had sold off almost ALL its physical assets because they made so much money acting as a broker for energy trading.  Think of them as the stock market (or eBay) for energy.  The only problem was that their principal value lay in the fact that people trusted them, trusted their market, trusted their systems, and trusted their software.  Then one day  it was demonstrated that this company lied, cheated, and stole in almost every way you could imagine.  Enron’s stock dropped from $90 to just under $1 in a matter of weeks.  Basically, Enron’s major asset was trust, which it lost, and the company disintegrated overnight.

So how does a company protect itself from such quick devaluation?  The same way you and I protect ourselves from economic turbulence; a big savings account and as little debt as possible.   Microsoft, for example, is famous for “saving” close to a billion dollars a month… yes, a MONTH!  At the same time, Microsoft doesn’t borrow money.  I have been told, by people I put NO trust in to know this information, that they don’t even lease the copiers.  Competitors who want to beat Microsoft can certainly do so, but it will not be an easy fight.  That kind of financial position means that competitors must beat them dollar for dollar, customer for customer, year in and year out… for YEARS!

So who else do you know that doesn’t use debt?  Here are are couple names both in IT and outside of it.  Accenture, Activision Blizzard, Apple, Bed Bath & Beyond, Broadcom , Citrix Systems, eBay, Gap, Google, Infosys Technologies, Juniper Networks, Marvel Technology Group, Qualcomm, Research In Motion, Stryker, Texas Instruments, and Yahoo.  Want to see something more amazing?  Check out those companies 1, 3, and 5 year average returns compared to the market average!

I think it was Warren Buffett who said, “Leverage [i.e. debt] is a funny thing, people who don’t understand it shouldn’t use it; and those who do, don’t.”

13 Deadly Sins

The “Deadly Sins” from P. J. Brown’sWriting Interactive Compilers and Interpreters Wiley 1979.

–to code before you think.
–to assume the user has all the knowledge the compiler writer has.
–to not write proper documentation.
–to ignore language standards.
–to treat error diagnosis as an afterthought.
–to equate the unlikely with the impossible.
–to make the encoding of the compiler dependent on its data formats.
–to use numbers for objects that are not numbers.
–to pretend you are catering to everyone at the same time.
–to have no strategy for processing break-ins.
–(A break-in is when you interrupt an interactive compiler, and then possibly continue it later. This is meaningful in an environment in which the compiler is run dynamically, such as many LISP and some BASIC environments. It is not meaningful for typical uses of C/C++ (although there was at least one interactive C environment according to Chris Lattner).)
–to rate the beauty of mathematics above the usability of your compiler.
–to let any error go undetected.
–to leave users to find the errors in your compiler.

This entry comes to us from the GCC Wiki.

Then there was Nethack

I recently saw a post from someone who (after 7 years) had finally ascended in NetHack. Ascending in NetHack effectively means beating the game and if you think 7 years is entirely too long to play a game you haven’t beaten; then you haven’t ever played NetHack.  I have posted about NetHack previously and suffice to say that I haven’t (in my 6 year of playing) ever come even CLOSE to finishing the game.  So to keep all of you from ever ruining your perfectly sane existence I am going to list a number of reasons why NetHack is both THE game by which all other RPGs will be judged and why you should NEVER start playing it!

  • –NetHack is the most expansive game ever created.  This is partially a product of design.  Like Legos, the game is almost stupidly simple, but the byproduct of such simplicity is infinite expandability.  Which brings us to the second cause of NetHack’s depth… It has been in constant development for over 20 YEARS!  Rogue (the game NetHack was based on) was created in 1980.  The origins of NetHack actually  pre-date the personal computer!
  • –Developers * Time * Design = The DevTeam Think of Everything! (TDTTOE.)  This is not a joke.  You honestly have to play the game to really “get” how connected each piece of the game is.  My favorite example of this comes from GameSpy when NetHack was inducted into their video game hall of fame: Eat a floating eye corpse and you’ll get ESP, which will allow you to see enemies anywhere on the map, but only while blinded. To take advantage of it, you may want to drink a potion of blindness, or preferably, find and wear a blindfold. Of course, while blindfolded, even with ESP you won’t be able to see inanimate objects on the floor — when you find piles of items, your character will have to “feel” for them. Oh, and you won’t be able to read scrolls. Whoops! In that pile of items you just felt is a cockatrice corpse — fortunately you were wearing gloves, otherwise you would’ve been turned to stone just by touching it. But now, blind and protected, you can pick up the cockatrice corpse and use it to attack monsters — now your enemies will turn to stone when you strike them! Unfortunately, their inventory turns to stone as well. Hey, no problem — you’ve got a pick-axe, so you can chisel open their statues to yield a pile of rocks and any of their old possessions. Sadly, thanks to the blindfold, you can’t see a nearby pit and tumble inside. Too bad you were holding the cockatrice corpse — it landed on top of you and turned you to stone. Yet Another Stupid Death, and another reason to cry out in anguish because they think of everything!
  • –You get one life in NetHack.  ONE!  That is it. You can suspend the game but not save it.  The closest thing to continuity between games is that you often come across your ghost from previous games (in fact your grave will often have your old loot in it…  cursed, TDTTOE.)
  • –The game doesn’t care.  In fact is probably works directly against you.  For example, you simply don’t know how an object will effect a situation until you use it (or until you find some side effect that you can test to discover it.)  All objects (potions, scrolls, spell books, etc.) are named differently EVERY GAME.  And so until you figure out what a “pinkish gold” potion is THIS TIME, you don’t know what it will do.  Then, even if you know what an object is, that doesn’t mean you know if it is cursed or blessed.  The game not caring also means that things like alters (or specialized equipment) are not necessarily likely to be the same alignment as you.  Hell, the moon phase even effects the game… the REAL MOON PHASE!  Oh, and did I mention that the levels are auto-generated and so are NEVER the same.
  • –Games go on for DAYS but death always seems to happen suddenly.  So just as you really start to get your hopes up, you loose 3 days worth of work in an instant because you get bit by a ware-rat, turn into a rat, and get killed by a group of fire ants that wouldn’t have given you any trouble 10 seconds ago.
  • –You have to do everything intentionally!  Don’t (I repeat don’t) just go running into a group of enemies and start swinging.  Because the game it turn based you REALLY need to consider as many possibilities of what will happen when you do something.  You certainly cannot think of everything that could happen but you will live longer if you at least try.  Heck, you cannot even leave old/cursed/useless crap laying around because and enemy is likely to pick something up and attack you with it.  And if you haven’t played before you probably can count on dying the first 6 times just trying to figure out how you will keep from starving to death.
  • –The only friend you have the entire game is your dog… and even god will not help you if you get him killed.

So 7 years isn’t to long to finish a game that was basically designed to be an exercise it masochism.  I will be lucky if I am able to ascend sometime in the NEXT 7 years.  For those who are not detered may I recommend the Absolute Beginners Guide to NetHack.

Make More Urgent the Necessity

Luck is the residue of design.

–Branch Rickey

After an Dr. Dobb’s interview with Christos Papadimitriou I have been thinking about design, creation, and development of complex systems.  Specifically systems that are fundamentally efficient.  The most important systems in existence are all amazingly complex (in fact, entirely too complex to ever design) and yet are built (often upon very simply concepts.)  They evolve into existence and are created without ever being engineered.

My favorite example is economics, which has as its basis very simple rules.  Economics sprout markets; which which are not only insanely complex but suffer from constant attempts to control always with perfect failure.  Other example include physics and the universe, computers and the internet.

So my question is, what other systems exist that can be created, but cannot be designed?

The Weekly Geek Revolt

Ever wonder why (knowledgeable) IT folk continue to hate Microsoft?  Check out this article by Randall Kennedy.  Kennedy talks about The Great Moore’s Law Compensator (TGMLC), and euphemism for Microsoft’s constant expansion with regards to system requirements.  This constant bloating from software version to software version happens regardless of the actual proportional improvement to the software.  The effect is that we run hardware that is a 1000 times more powerful and it was just a dozen years ago; but the speed at which are applications run are basically identical (and in many cases actually SLOWER.)

The second link is to the video presentation of Mark Pesce discussing the role of piracy in the film/television industry.  It is a great rundown of the state and future of TV/film and the opportunities in those industries.  The basic rundown is that everyone is going to be better off except for the broadcasters; who will see their virtual Monopolies disappear and, with them, their huge profits.

Life is a foreign language; all men mispronounce it.

When I first starting working as a computer programmer, I constantly ran into the problem of bosses who wouldn’t appreciate the severity of the problem I was describing to them. After a number of years I improved on the situation by modifying the language I used when explaining a problem. This didn’t solve all of my employment issues (at the time I didn’t fully appreciate how dysfunctional the communication chain was in my employers hierarchy) but it helped substantially.

To understand what words mean when you are talking to programmer I recommend this article by Charles Miller. Here is an excellent example of a software engineering concept that non-programmers often fail to understand:

To a programmer, a problem is trivial if there is a clear solution, and the only thing that needs to be done is to implement it.

The only caveat is that triviality refers to how hard the problem is to solve, not how hard it is to implement the solution. So there is no necessary relation between a task being trivial, and how long it takes. To the programmer, once the plans for the bridge have been drawn up, the materials chosen properly and the model tested for how it would survive wind, traffic and earthquakes, actually building the bridge is trivial.

I am not sick. I am broken.

Firefox changed some of it’s defaults in version 2.0.  The new defaults are mind-numbingly bad in some places; and simply annoying in others.  Thankfully they can be fixed.  Here are a couple of the worst offenders and how to fix them.

Changing Back to shrinking Tabs in Firefox

  1. Open a new firefox tab.
  2. Type “about:config” into the address bar
  3. Type “tab” into the filter field.
  4. Change the settings of both “browsers.tab.tabClipWidth” and “browsers.tab.tabMinWidth” to 5
  5. Restart Firefox.

Use a single close button on Firefox

  1. Open a new firefox tab.
  2. Type “about:config” into the address bar
  3. Type “browser.tabs.closeButtons” into the filter field.
  4. Change value to “3” (without the quotes)
  5. Restart Firefox.

With foxes we must play the fox

Here is a list of Firefox shortcuts I have found over the years. I have kept this list on the company blog for months now, and yet, every-time I read over it I find something useful.

Shortcut Description
Alt + B Open the Bookmarks drop-down menu
Alt + D Select the current Location bar text
Alt + E Open the Edit drop-down menu
Alt + F Open the File drop-down menu
Alt + G Open the Go drop-down menu
Alt + H Open the Help drop-down menu
Alt + T Open the Tools drop-down menu
Alt + V Open the View drop-down menu
Alt + Enter Open address in a new tab
Alt + Left Arrow Move back
Alt + Right Arrow Move forward
Alt + Home Open the Home page
Alt + F4 Close active window
Backspace Move back
Delete Delete
Esc Stop downloading a page
End Move to the bottom of a page
Home Move to the top of a page
Ctrl + + (plus sign) Increase text size
Ctrl + – (minus sign) Decrease text size
Ctrl + 0 Restore normal text size
Ctrl + 1 Open Tab 1
Ctrl + 2 Open Tab 2
Ctrl + 3 Open Tab 3
Ctrl + 4 Open Tab 4
Ctrl + 5 Open Tab 5
Ctrl + 6 Open Tab 6
Ctrl + 7 Open Tab 7
Ctrl + 8 Open Tab 8
Ctrl + 9 Open Tab 9
Ctrl + F4 Close active tab
Ctrl + F5 Refresh (override cache)
Ctrl + A Select All
Ctrl + B Open/close the Bookmarks pane
Ctrl + C Copy
Ctrl + D Add a bookmark (defaults to the active page)
Ctrl + E Activate Web Search
Ctrl + F Find
Ctrl + G Find again
Ctrl + H Open/close the History pane
Ctrl + I Open/close the Bookmarks pane
Ctrl + J Open/close the Downloads dialog box
Ctrl + K Activate Web Search
Ctrl + L Select the current Location bar text
Ctrl + M Open a new e-mail message using the default e-mail client
Ctrl + N Open a new Firefox window
Ctrl + O Open a file
Ctrl + P Print
Ctrl + R Refresh
Ctrl + S Save As
Ctrl + T Open a new tab in the current Firefox window
Ctrl + U View the source code for the current page
Ctrl + V Paste
Ctrl + W Close the active tab within the current Firefox window
Ctrl + X Cut
Ctrl + Y Redo
Ctrl + Z Undo
Ctrl + Down Arrow Select next search engine in Web Search bar
Ctrl + Up Arrow Select previous search engine in Web Search bat
Ctrl + Tab Select the next tab within the current Firefox window
Ctrl + Page Down Select the next tab within the current Firefox window
Ctrl + Page Up Select the previous tab within the current Firefox window
Ctrl + Shift + Tab Select the previous tab within the current Firefox window
Ctrl + Enter Add “www.” to the beginning and “.com” to the end of the text in the Location bar
Ctrl + Shift + Enter Add “www.” to the beginning and “.org” to the end of the text in the Location bar
Ctrl + Shift + R Refresh (override cache)
Ctrl + Shift + W Close Firefox
Shift + F3 Find previous
Shift + F6 Move to the previous frame
Shift + Enter Add “www.” to the beginning and “.net” to the end of the text in the Location bar
Shift + D Delete the selected Autocomplete entry
Shift + Backspace Move forward
F1 Open Mozilla Firefox Help
F3 Find again
F5 Refresh
F6 Select the current Location bar text
F7 Toggle on/off Caret Browsing
F11 Switch between full-screen/normal view