How to Install Java 8 on OSX

No comments:
As usual, the instructions on how to install Java 8 on OSX are really, really bad if you start from a search for "install java 8 osx". You get a page hopefully entitled Java 8 Installation for OSX. I invite you to click on that link, and read what that page has to say. There are only internal links, no links to anything you can download.

Frustrated, I went to plain-old oracle, where I had to navigate through drop-down menus to oracle/java. Since Java 8 was just released, I expected to see something obvious. After searching through the visual clutter, I clicked on Java SE 8 is Now Generally Available. Again, so much visual clutter, but my 'downloadar' was going off - I was getting closer! Download buttons! Finding JDK 8 I got to a download page, where you have to click a "license agreement" bullet (is that even legally binding?) and finally, the bits, which I put on dropbox for my future convenience.

Eureka! This visual clutter was difficult to find!

Front-end web frameworks and other neat web stuff as of mid 2013

No comments:
There's been an explosion in front-end web frameworks over the last two years or so. It's exciting, but it's hard to keep up, and I'm really not trying to since I'm doing lots of cool server stuff these days. I'm just going to mention a couple of them that pique my interest, mainly so that if I come back to this I won't forget!

  • Meteor. This is both a front and a back end system. It has a very cool reactive programming paradigm that runs all the way back to the data, and a killer package manager built in. It is built on Node and Mongo, and I have high hopes for it.
  • AngularJS. HN linked to a great rundown on SO on how Angular differs from jQuery. Angular also uses reactive paradigm that allows the programmer to extend HTML for their application. Powerful stuff.
  • Ractive. This is very, very new but it looks quite good. The concepts are Angular-like but the code looks better, and the excellent tutorials show that the author really pays attention to detail.
It's a visualization library, but D3 (probably better called D3.js or D3js so as not to be confused with Diablo 3, etc) deserves a mention. I'm particularly fond of this very well done D3js tutorial site. D3 is a bit of an odd duck because it really doesn't really do much on it's own; however it's creator, Mike Bostock, seems to be very productive with it and he creates some amazing visualizations with it. I'm still excited about it, since I started with Prefuse and then Flare and now D3 is the latest incarnation in that line of visualization tools.

On the size/performance/page size area, I recently ran across zepto and pure css. Zepto is a jQuery replacement that basically sacrifices browser compatibility for size. It weighs 5-10k vs jQuery's 50k. Pure is a pretty CSS framework that weighs in at a svelt 4.3KB - and I think it has 90% of the functionality I want from projects like Bootstrap. Having state-of-the-art JS and CSS support in a page under 10k makes me happy.

And now for something completely different: RethinkDB. This project strikes me as the Meteor of NoSQL DBs. Rethink is what Mongo should have been. The docs are extremely well-written, the team seems solid and directed, and I wouldn't be surprised if Rethink displaces Mongo as king of the NoSQL. 

Creating an iPhone Ringtone from a Youtube Video

No comments:
XKCD makes an excellent point:



The question becomes: how do I get a ringtone like this? First, find a good source. YouTube has a good source for mosquito sounds, although SoundCloud might be a better option, YouTube has a much wider selection.

Now the question becomes: how to get that sound on my phone as a ringtone. There are many ways to do it. The cleanest way is to install an audio router, such as sunflower (for OSX). However, this isn't something I'll want to do all the time, and the sound quality doesn't really matter that much to me, so I decided to do the simple thing and record computer speaker output with the Voice Memo app on the iPhone. Here's how it worked:

  1. Record the audio with your iPhone Voice Memo app.
  2. Sync to iTunes
  3. Use GarageBand (which is system software) to import the audio file, set the loop, and modify. Instructions on how to do this are available inside GarageBand help - Select Help from the menu and then search for "ringtone".
  4. In iTunes, select your iPhone and then select "Tones" from the psuedo-tabs. If you're like me, you never click on this and it's easy to miss.
  5. Click the "Sync Tones" box.
  6. Select your tone.
  7. Hit the "Apply" Button
  8. In your iPhone, go to Settings|Sounds and select your ringtone!
  9. Profit!
Personally, I think it would be stellar for Apple to add the ability to add a "Use Voice Memo as a ringtone" function right on the phone, without having to go through all of these steps. You could put it in the "Share" menu. Are you listening, Apple? :)

The Magic Command Line that will Force Juniper VPN to Reinstall on OSX

No comments:
So, if you just delete Network Connect.app in OSX, this won't do the trick. You need something more, a magical command line that will make everything ok. What is this command line?

      sudo rm -rf /usr/local/juniper

And then, you're golden.

Computers aren't unequivocally good for kids

No comments:

From Evernote:

Generational Error mode about computers

I'm 37 and I come from a generation that invented the personal computer. Well, a tad younger really. But when I was growing up I know my parents were intimidated by computers, and basically felt that whatever I did with them made me "smart". 

This, of course, was not the case in the 80's, and it's not the case now.

Computers do not make you smart any more than reading makes you smart. If you read trash, or do trash activities on the computer, then you are not doing anything smart. Playing Ultima III on the Apple IIe did not make me smarter (although arguably playing with Logo and Basic did).

This distinction is lost, I believe, on many parents today. Parents encourage computer use because kids need "computer skills" to succeed in today's marketplace. Computer usage is seen as all benefit and no cost.

Recognition of online addiction has been incredibly slow because of this cultural, historical bias in favor of computers. "Jimmy's on the computer" is still too often a source of pride. In truth, Jimmy being on the computer is meaningless, although unless Jimmy is working on something specific, is probably harmful to Jimmy.

Computers are powerful tools for content creation and consumption. As such they are terribly dangerous. It is interesting to me that there is ever greater awareness of the fragility and complexity of the human mind, and yet so little cultural mistrust of the informational firehose that is the computer. For every Wikipedia resource, there are thousands of porn sites. For every programming tutorial, there are hundreds of time wasting forums like Reddit, Usenet, or 4Chan. For every kid learning Photoshop, there's a hundred kids playing World of Warcraft.

Computers are getting smaller, more portable. Sensors are getting more pervasive, sensitive, and networks are getting faster and more ubiquitous. It is inevitable, perhaps, that more of our interactions with each other are mediated by computers. But this is not a change to be blindly embraced. It is a change to be wary of, distrustful even.

What we need to do is enumerate our desires and use technology to achieve those, and no more. For example, I want to be able to contact people easily - and leave them a message if they're not available. Ideally I'd even like to choose to leave them a message even if they are available! I want to use my computer as a journal and logbook, because my handwriting is horrible. I want to use it as a publishing platform. I want to use the Internet as a research tool for professional interests (which ironically revolve around building new things for the Internet).

A couple of songs

2 comments:

(Click on the links to play. Blogger doesn't host MP3s so I'm using box.net).

I'm rather proud of these pieces, even if they are one-off doodles.

No Expectations (aka "wheat")

In this piece I was playing with a few melody ideas, and one new left-hand idea: a quick 3-chord descending progression that I never used before. My right hand got inspired by the newness of what the left was doing, and this is the result.

A Mood

This piece is a lot more intense, and far more textured. Might make good background in an intense movie scene. I don't think I could do this on an acoustic piano because I'm holding the sustanuto pedal down the whole time, relying on the piano's polyphany limits to reduce the mushiness. I was intentionally trying to be repetative, at least in the beginning, but I hear a lot of nice variation anyway. The variation is more rhythmic than tonal, although there is some interesting melody/harmony stuff after the mid-track dynamic shift.

I'm proud of both pieces, and this is the first time I've publically posted anything to the internet. Anyone who's heard me play knows that this is basically what I do: I compose on-the-fly.

Dance with Dragons: an Index (spoilers)

No comments:

3 Prologue Scary Skinchanger & Others vignette
16 Tyrion Voyage to Pentos and Ilyirio
31 Daenerys Ruling Mereen; Drogon murders a child
46 Jon Difficult dealings with Stanis over defeated Wildings
60 Bran North of the Wall with Jojen, Meera, Hodor and Coldhands, looking for "Three-Eyed Crow"
71 Tyrion Leaving in Pentos with Ilyrio
83 The Merchant's Man (Quentyn) Quentyn Martell quest for Daenerys' hand seeks passage Volantis to Mereen
95 Jon Kills Janos Slynt
112 Tyrion Leaving Ilyrio with Duck, Haldon & Griff on a river journey
123 Davos Marooned at Sweetsister by Sallador Saan
134 Jon Executes Mance Rayder; Melisandre destroys horn of Jaromun; the wildings come through the Wall.
148 Daenerys Dealing with insurrection at Mereen "Sons of Harpy"; two dragons in chains
161 Reek (Theon Greyjoy) Theon has been tormented by Ramsay Bolton; used to legitamize marriage to fake Arya
169 Bran Meeting with Greenseer!
179 Tyrion Bonding with sellsword companions over games and learning.
192 Davos
203 Daenerys
218 Jon
232 Tyrion
243 Davos
253 Reek (Theon Greyjoy)
267 Jon
276 Tyrion
293 Daenerys
306 The Lost Lord (Griff/Tyrion)
320 The Windblown (Quentyn)
332 The Wayward Bride (Asha Greyjoy)
351 Tyrion
372 Jon
382 Davos
395 Daenerys
407 Mellisandre
420 Reek (Theon Greyjoy)
434 Tyrion
448 Bron
461 Jon
473 Daenerys
484 The Prince of Winterfell (Theon Greyjoy)
500 The Watcher (Balon Swan)
514 Jon
524 Tyrion
549 The King's Prize (Asha Greyjoy)
564 Daenerys
579 Jon
593 The Blind Girl (Arya Stark) We follow her training as a Facedancer
605 A Ghost in Winterfell (Theon Greyjoy) Mysterious murders at Winterfell.
618 Tyrion Sold as a slave with Penny at an auction by Yunkish outside the gates of Mereen
632 Jaime Wrapping up the war at Riverrun; taking hostages; meeting with Brienne of Tarth
647 Jon
661 Daenerys
673 Theon Escapes?!
687 Daenerys Jumps on Drogon and flies away from Mereen
700 Jon Dealing with Wildings
717 Cersei
730 The Queensguard (Bold Barristan) Barristan gets wise to intrigue
741 The Iron Suitor ()
754 Tyrion Escapes from Yezzan
769 Jon
783 The Discarded Knight (Bold Barristan) Baristan takes charge
793 The Spurned Suitor (Quentyn Martell) Plots to ride one of Daeny's dragons
801 The Griffin Reborn (John Connington)
814 The Sacrafice (Asha Greyjoy)
827 Victarion
835 The Ugly Little Girl (Arya Stark) Arya's first assasination as a Facedancer
848 Cersei The former queen is run through Kings Landing naked to atone for her crimes.
860 Tyrion Signs on to the Second Sons; Promises Pentos and plots to turn them against the Yunkai
872 The Kingbreaker (Bold Barristan) Barristan captures the king on suspicion of plotting.
887 The Dragontamer (Quentyn Martell) Quentyn is mortally burned by a dragon.
899 Jon Stabbed at least 4 times in treacherous betrayal. Probably dead.
914 The Queen's Hand (Bold Barristan)
929 Daenerys
940 Epilogue (Kevan Lannister) Varys murders Kevan to destabilize Westeros for Daeny's imminent reconquest.

Tim Bray on Web vs Native

No comments:

Tim Bray wrote a little blog post on Web vs. Native apps and makes a really important point: actually, all apps these days use the web. The only distinction is the execution environment.

I wrote a comment where I noted he missed a very important property that webapps mix well together. The same cannot be said for Android or iOS apps. Native apps can pull in resources just as well as webapps, but they don't do mashups. The data-structure of the web-interface, the DOM, is understood well enough that you can enable collaboration between programs.

After I posted this comment it occurred to me that this common format, the DOM, makes certain UI consistent across applications in a way that native apps don't achieve. You can select any text content, for example. You can zoom in and out of a webapp. You can send people links to parts of a webapp (maybe).

Edge cases: bookmarklets don't work on non-HTML pages?

No comments:

Consider this funny post. It's plain text. If you try to run a bookmarklet (like "Share in Google Reader"), it will fail because there is no DOM to modify. Not really sure there is a work-around, but it's an interesting edge case to keep in mind, both for bookmarklet writers and publishers (who may want to avoid serving non-HTML content to user agents).

SMS is new Telegram. Stop.

No comments:

Watching Jeeves & Wooster. Struck by telegram silimarity to SMS. Telegram less convenient, far slower, much more classy.

Length contstraint makes brain express self succinctly. Enjoy observed connection with past.

"Forgive me for sending you this long letter. I did not have time to write you a short one." - Blaise Pascal

Stop.

The most important fact of your existence.

No comments:

The Oil Drum | Time to Wake Up: Days of Abundant Resources and Falling Prices Are Over Forever

The purpose of this, my second (and much longer) piece on resource limitations, is to persuade investors with an interest in the long term to change their whole frame of reference: to recognize that we now live in a different, more constrained, world in which prices of raw materials will rise and shortages will be common.

Jeremy Grantham is part of the monied elite, CIO of a $106 billion investment firm. And here he writes about a vast economic inflection point that we are currently experiencing. This reflects my own observations, and is perhaps the most important fact of modern life. The entire article is of value not only for building a compelling case for the reality of the inflection point, but for highlighting the reasons for it, the reasons why it is ignored, and the lessons we should be taking from it.

The key point is that we live in a time of unprecedented abundance. If we want to continue living in abundance and not experience a painful contraction, then we need to use this windfall wisely: to produce replacement energy sources which are sustainable.

To realize how threatening it would be to start to run out of cheap hydrocarbons before we have a renewable replacement technology, we have only to imagine a world without them. In 17th and 18th century Holland and Britain, there were small pockets of considerable wealth, commercial success, and technological progress. Western Europe was just beginning to build canals, a huge step forward in transportation productivity that would last 200 years and leave some canals that are still in use today. With Newton, Leibniz, and many others, science, by past standards, was leaping forward. Before the world came to owe much to hydrocarbons, Florence Nightingale – a great statistician, by the way – convinced the establishment that cleanliness would save lives. Clipper ships were soon models of presteam technology. A great power like Britain could muster the amazing resources to engage in multiple foreign wars around the globe (not quite winning all of them!), and all without hydrocarbons or even steam power. Population worldwide, though, was one-seventh of today’s population, and life expectancy was in the thirties.

But there was a near fatal flaw in that world: a looming lack of wood. It was necessary for producing the charcoal used in making steel, which in turn was critical to improving machinery – a key to progress. (It is now estimated that all of China’s wood production could not even produce 5% of its current steel output!) The wealth of Holland and Britain in particular depended on wooden sailing ships with tall, straight masts to the extent that access to suitable wood was a major item in foreign policy and foreign wars. Even more important, wood was also pretty much the sole producer of energy in Western Europe. Not surprisingly, a growing population and growing wealth put intolerable strains on the natural forests, which were quickly disappearing in Western Europe, especially in England, and had already been decimated in North Africa and the Near East. Wood availability was probably the most limiting factor on economic growth in the world and, in a hydrocarbonless world, the planet would have hurtled to a nearly treeless state. Science, which depended on the wealth and the surpluses that hydrocarbons permitted, would have proceeded at a much slower speed, perhaps as little as a third of its actual progress. Thus, from 1800 until today science might have advanced to only 1870 levels, and, even then, advances in medicine might have exceeded our ability to feed the growing population. And one thing is nearly certain: in such a world, we would either have developed the discipline to stay within our ability to grow and protect our tree supply, or we would eventually have pulled an Easter Island, cutting down the last trees and then watching, first, our quality of life decline and then, eventually, our population implode. Given our current inability to show discipline in the use of scarce resources, I would not have held my breath waiting for a good outcome in that alternative universe.

But in the real world, we do have hydrocarbons and other finite resources, and most of our current welfare, technology, and population size depends on that fact. Slowly running out of these resources will be painful enough. Running out abruptly and being ill-prepared would be disastrous.

If you want to read about the effects of a contraction, written in a realistic if chilling way, read The Windup Girl by Paolo Bacigalupi. That is not a world in which I personally would want to live.

Realistically, what can we do? First, lets stop burning incredible quantities of resources and lives in pointless wars. The fact is we are vulnerable to terrorism, it's time to just learn to live with it. Second, let's stop burning resources on mindless consumerism. We don't just burn resources like money, but the producers burn resources on engineering and marketing - people fritter away their days in cubicles making products that rational people wouldn't want. Alas, this is a cultural problem and so difficult to fix, but I personally have hope. Third, perhaps the single most important way to reduce demand for oil is to let people work from home. Indeed, we need to require that a larger fraction of the workforce work from home. (Critical to this is ubiquitous and cheap internet - which needs to be a public utility.) Last and not least, we need to stop getting distracted from the big problems by all the little problems. A good first cut at that problem would be to simplify everyone's lives with a flat tax, and a new law requiring that all legislation passed by congress be read aloud (and heard) by all members before being voted on - the idea being that short legislation is good legislation.

Silence The Great Critic

No comments:

The Great Critic has sat in patient judgement over the thoughts, opinions, and art of countless generations of thinkers and artists. He observes everything ever produced, and renders his judgement in a universal language that has always been understood, and will always be understood.

The Great Critic is nothing less, and nothing more, than Silence. (If you add a comma to the title of the post, you will see it is "Silence, the Great Critic.")

When we create and share our work and receive no reaction, none whatsoever, that is the sound of the Great Critic, and it is not easy criticism to hear. When the Great Critic has passed judgement, over and over again, on your life's work, it is hard not to think that he is also passing judgement on your life.

But, life itself is loud, and The Great Critic cannot pass judgement on life itself. There is never a moment when his stinging judgement can be heard. There is always, at least, the breath. The beating of your heart. So, even if the Great Critic has been harsh about your writing or your work, take heart and listen to the resounding non-silence which is your life, and rejoice.

Why we deserve President Donald Trump

No comments:

Ok. The right (and some on the left, like Blagojevich) have innovated and profited from the innovation: they've made the startling realization that the public has neither the attention span nor the will to hold individuals or organizations accountable for lying, cheating, stealing, or profiteering.

When there is literally no recourse for gross injustice, up to and including the inability to sway public opinion against those who are obviously selfish, devious and wrong, then we have truly crossed a line as a society.

It is honesty, it is personal responsibility, it is a sense of community and shared sacrifice which made America great. People cheated, sure, but if they were caught they had the good sense and the shame to withdraw from public life (if not into prison). No more. Now our politicians stand up and lie to our faces, their sense of entitlement palpable, the sniveling practicality of those who realize that there is no social cost any more to supporting a liar, a cheat.

We deserve Donald Trump as our president.

Worst excuse ever.

No comments:
"I really wish I could help you, but our system won't let me do that." - Purple Yoga studio manager, Sequanna Williams. (Yelp review)

Sequanna is not the first person to use this excuse to not do something, nor will she be the last. However, I expect better from small business, particularly one that values morality (as any good yoga studio should).

There are many reasons to say "no" to a customer request. Perhaps it's unreasonable, perhaps it's against long-standing company policy and there is no compelling reason to make an exception. Perhaps it's too much work, or the person just doesn't feel like it. Or maybe it's too expensive. But to say that you cannot make an exception because "the system won't let me" is not a valid reason.

Why is "the system won't let me" not a valid reason? First and foremost, because it's a lie. Businesses, especially small business, have extraordinary freedom in the types of contracts they enter into. Or, another way to look at it: if the Dalai Lama was the one making the request, do you think Sequanna would tell him, "I'm sorry, the system won't let me do that"?

Second, because it places "the system" above human judgment. Basically, the person is telling me that both of our actions are circumscrived by the whim of the system. They are saying that "the system" is actually above them, controlling them, and indeed above all people at the business, including customers. "The system" makes decisions. "The system" controls what they can and cannot do. If "the system" doesn't allow it, then it cannot be done.
She can, and should, do better.

2010: The year of music

No comments:
For me, the new music landscape has been all but barren for many years. KROQ was my radio station from middle-school on (and actually KTWV - The Wave - was my station in elementary school. I still have a fondness for New Age to this day. A lot of it is insipid crap, but Vangelis? Ray Lynch? Mike Oldfield? all of them pure genius). KCRW resuscitated my interest in new bands around 2005, and ushered in a flurry of wonderful bands: from Sigur Ros to the Yeah Yeah Yeahs to Jesca Hoop, it was a wonderful thing. But that impact slowly faded away to another wasteland.

Hunting My DressAnd once again, in 2010, I've been lucky enough to get a second musical rennaissance. Jesca Hoop released her second album this year, and it was far better than I had any right to expect. "Murder of Birds" is in the top 5 tracks of all time. If I had written this 2 months ago, that would have been the major highlight. We'll get to that.

ActorSt. Vincent released an amazing album late last year, Actor, which I didn't discover until this summer - coincidentally on the same day Annie Clark was playing a show in San Diego (which I went to). Ironically the song that set me off was "Laughing with a Mouth of Blood" and it wasn't the strongest on the album, not by half. Annie is a brilliant songwriter with a wonderful ear for texture and contrast. Her first album, Marry Me, is just as good.

The Way OutThe real highlight of the year didn't happen until late in the year. In November, I think, The Books played a live set at KCRW. I thought "interesting, but no big deal". But then I heard their newest album, The Way Out, in it's entirety and instantly fell in love and planned to buy 10 copies to give to friends. I don't think I've felt this strongly about an album, ever.

The album is pure genius from beginning to end, with a lush, intelligent, unique sound. If Annie Clark is perfecting her linear contrast (it's most obvious on the track "Your Lips Are Red" on Actor), The Books have perfected the profound/absurd contrast simultaneously. By sampling esoteric self-help tapes and dubbing them in absurd ways, but playing this over an enormously complex, textured and agonizingly detailed and beautiful arrangement it's like The Books are consuming the swirl of modern day information, and responding with wordless insight, biting humor, and hope. More than any other band in existence, I feel like The Books are "my band".

Have One on MeIf this was "The Year of The Books", then along with St Vincent and Jesca Hoop there were two other really good albums released this year. Both artists have been around a few years but both are new to me. Joanna Newson's "Have One On Me" reminds me a lot of Kate Bush and JRR Tolkien. Kate because of the emotionality, visuals, and complex musicality, Tolkien because of the focus on the natural world. Even if she mostly sings of love, this is love on a farm, or in the mountains. She sings of the wind and the rain, and it's lovely. Particularly the track "In California".

This Is HappeningOn the lighter side was a wonderful release by LCD Soundsystem, "This is Happening" containing my favorite dance track in a long time, "I Can Change". Just try listening to that track without moving some part of your body. And of course the single "Drunk Girls" is hilarious (check out the video - it's insane & quite funny).

Oh, a few last things. I finally picked up my own copy of Joni Mitchell's "Ladies of the Canyon". It's still as good as when my parents used to play it, and it stands up really well to the test of time, too. Also, Arcade Fire did a decent job with their 2010 release, "The Suburbs". In all honesty I find Arcade Fire to be a bit mediocre, a bit boring, but nothing really objectionable. The New Pornographers released an album ("Together") that I was into for a while, but then realized that all those deep lyrics were really just free association nonsense and rapidly lost interest. Really good music, though. (I wish whoever writes the lyrics for them would get their shit together (or adopt The Books' method of overdubbing stuff that is obviously nonsense). The track "We End Up Together" should be a rousing anthem, but instead it's just nonsense. I felt betrayed when I realized I'd been duped!)

Quantum mysticism and other syrupy nostrums

No comments:
"History abounds with religious enthusiasts who have read spiritual portent into the arrangement of the planets, the vacuum of space, electromagnetic waves and the big bang. But no scientific discovery has proved so ripe for spiritual projection as the theories of quantum physics, replete with their quixotic qualities of uncertainty, simultaneity and parallelism. [What the Bleep do we Know] abandons itself entirely to the ecstasies of quantum mysticism, finding in this aleatory description of nature the key to spiritual transformation. As one of the film's characters gushes early in the proceedings, “The moment we acknowledge the quantum self, we say that somebody has become enlightened." A moment in which "the mathematical formalisms of quantum mechanics [...] are stripped of all empirical content and reduced to a set of syrupy nostrums""

-Margaret Wertheim

(Margaret: thank you, thank you, thank you.)

How to install ICU on OSX

4 comments:
The readme makes this very difficult to suss out. Here you go:

Installed ICU (International Components for Unicode) by hand on my Mac. The readme is incredibly obtuse. Hopefully this will save you pain. Here are the instructions:


tar xzvf icu4c-4_4_2-src.tgz
cd icu/source
chmod +x runConfigureICU configure install-sh
./runConfigureICU MacOSX
make
sudo make install

A smorgaspost

1 comment:
I haven't posted in a while (and I see that when I did I was in rather a bad mood; poor GRRM!) and there's a lot to talk about:
  • Geeking out with Clojure, a functional language.
  • Geeking out with Legos. More about that later.
  • Geeking out with Plants Vs. Zombies.
  • Geeking out with Java: OSX, Eclipse, and Google App Engine.
  • Geeking out: issues with Linode
  • Geeking out: making a decision about PHP and WordPress
Clojure is neat, but it's so general that it's hard to get your brain around the fact that, really, you can do whatever you want with it. The number of patterns in Lisp/Clojure are immense - even more in Clojure because it's a dynamic functional language. The two things I want to write in clojure are: a completely dynamic webapp framework, which basically starts off life as a network aware REPL and kinda "grows" from there. When you install it, you "regrow" the system. Your apps "grow" too. Of course this should run on App Engine and *never* have to be redeployed. The other thing I really want to write is a GUI app that takes a two dimensional bitmap and interprets it in arbitrary ways: strings, numbers, etc. I'd like to "grow" that into a full-fledged text editor. The community is really great, btw. And I like that the logo is at once geeky and hippy (that's a lambda in there, baby!)

Legos somehow I got the itch to buy some of their Star Wars kits. I used to love building things with Legos as a kid - specifically spaceships. I would build them and then throw them in the air (I loved the wind rushing past their "hulls") and then when they hit the ground I'd not touch anything, observing carefully what had happened. Depending on my mood I would either do minimal repair, or I'd try to make it even stronger. A fun game. But these newfangled kits are nothing like that: the X-Wing was ~350 pieces and there were maybe 40 "normal" Legos in there. Maybe. The other 310 were customized, you'll-never-figure-out-how-to-use-this-in-anything-else sorts of pieces. The AT-AT was 1200 pieces, and the ratio was about the same (although, in fairness the AT AT was a motorized beast that required some custom bricks.) It's hard for me not to draw a parallel between this sorry state of affairs and computer science: it's become cliche to treat "Legos" as some sort of monicker for standardized interchangability. What irony that Legos are no longer standard or interchangable. And this is probably for two very simple reasons: the models look better with more custom bricks, and you're more likely to buy more Legos if you aren't tempted to "roll your own". As I was building the models I kept thinking "why did they make that brick? They could have used these other two together..." which is something I also think about when building software. Weird.

Plants Vs Zombies is the clear "runner up" in the "great casual game wars of 2010" (the winner being Angry Birds, of course). PvZ is a really good take on the tower game genre. I think I saw it for the first time on a demo PC at Costco. Anyway, apart from needing some more balancing (Gloom Shroom is WAY overpowered) it's a great game. It's also an interesting exploration of the interdependency of a team - each individual contributes different things during the game (and different things during different phases of the game), and it would be foolish for one plant to claim that they are better than any other plant. For sure, there are some plants which are more valuable, in that they would be more expensive to replace. It's hard not to draw the parallels to building a business, a team, and seeing that team change and grow.

Java is still my mainstay (and increasingly Google App Engine) and ironically all this work with Clojure has made me, if anything, even more fond of the old beater language/environment/coffee that is Java. To that end I actually spruced up my environment (OSX and Eclipse) a bit. For Eclipse mainly consisted of updating the OSX developer library (for javadocs and JDK source), adding TLD files to my GAE projects (without them the JSP editor complains when you use JSTL). While I was at it I reinstalled macports (which had somehow got corrupt) and spruced up my .bash_profile to fix my prompt and ls defaults. I also installed ForkLift - which is a nice Finder (and CyberDuck) replacement, and a Clojure plugin for Eclipse (which is shockingly stable). This all fits in nicely with my newfangled "Workspace" philosophy, which I may write about later.

Linode has annoyed me. They deleted my images when the CC I had on file failed. This upsets me, but not as much as you'd expect: I didn't have anything too heavy running on the host. I'm not even sure if I want a VPS anymore. On one hand, it's nice to have a persistent host with a stable IP address completely under your control somewhere in the universe. There's just so many things you can do with it (not the least of which is to install the Dropbox daemon so that you have an offsite backup not controlled by Dropbox). But Linux sysadmin is not my forte or interest, those stable IP addresses are like honey to hackers. I'm not sure if I'm going to reup or if I'm just going to settle for the much-less-general-but-super-easy-to-administer Google App Engine. The bottom line is that, unless you're a control freak, you don't need your own host for even the most involved websites - so why bother?

Making a decision about PHP and WordPress. I've pretty much made a decision to avoid this technology stack. It's a justifiably popular solution for lightweight CMS that most websites need. This isn't to say that there's anything wrong with it, per se, it's just that there is only so much I want to learn. I actually really admire PHP's directness and the fact that it's purpose-built. And Wordpress has a pretty amazing bang-for-the-buck ratio, especially when you take into consideration available templates. I guess I just don't like munging HTML on the server anymore. If you want to munge HTML, do it on the client, with JavaScript, the way God intended. The server should really be just a dumb, RESTful data store used by the DOM to populate itself. (Interestingly it is theoretically possible to write a WP template that does things this way...tempting!)

Speaking of Google App Engine - what a great product. Dealing with some Linode drama I have come to realize the costs and benefits of running your own host, and what a great job the GAE team has done making deploying and managing your apps as easy as can be. They have lots of nice touches, like the ability to deploy in-active versions for testing, and full text search on logs - all through the web. This is all stuff that you can do with linux/apache/tomcat but it takes a lot of work to setup and maintain. Kudos to GAE.

Knowing and No'ing

1 comment:

The delicate art of saying "no" to people when they are looking for technical help, especially at parties.

The thing is, I'm pretty smart. I'm no Einstein but I can hold my own when it comes to math, science, computers and most nerdy things. I have a physics BS from a not-too-shabby school (UC Irvine) and I've been using computers since the Apple IIe first came out. (That's like, 25 years).

It's pretty cool to know all the stuff I know. It's useful. I can Do Stuff.
The thing that gets me down, though, is that when people realize how much I know, then they want my help. Usually they want my help fixing their computer. Now, this is something I used to do 15 years ago. But it is unreasonable for a conversation to turn, as if on a dime, from something fun that we are both enjoying to what basically boils down to getting grilled on all manner of technical matters.

Generally, I like helping people, and I like explaining how things work. But not all the time, and not on demand, and certainly not in the kind of detail that people seem to want, and not at a social event.

One bitter irony is that even if I suck it up and try to answer the question, whatever information I give them will soon be forgotten, and their problem won't actually be fixed. The bottom line is that they are not getting the help that they need, nor am I getting to enjoy myself.

This is something I don't understand. Upon finding out that someone is a hairdresser, do you start asking them for advice about your hair? Or if a person is a lawyer, for advice on a case you're involved in? Or a doctor about your ailments? Why is it then so acceptable, in a social situation, to start asking a programmer about computers?

The bottom line is that it isn't acceptable. If you really want my help with something, you can hire me to fix your problem, and it will get fixed (assuming it's in scope of what I do, which is custom software, not computer repair). I'll even be happy to explain what I did, why, and the technologies behind the solution, much like a good doctor would. But what I will not do is talk about work at a social event to satisfy idle curiosity.

There are two exceptions to this: first, if you are yourself an experienced geek wanting to debate  some esoteric idea, and if I'm in the mood for the discussion, great. Second, if you are not a geek but want to debate about either the philosophy or politics of technology, then that's cool, too. But I do not want to discuss why you can't sign into your AOL account or how your Dell laptop has gotten slower over time and do you have a virus and how do you clean it off and will it require a reformat of the hard-drive.

Publishing an ebook on Amazon - 2010 edition

No comments:
A friend asked me to publish an ebook for him. I agreed.

In initial Google search turned up a lot of (expensive, in terms of wasted time) dead-ends:
  1. Askville - where Steve Weber (who writes books and a blog on self-publishing) tells you you need an ISBN block, a mobi-pocket account, and the mobi-pocket software. circa 2006? NO LONGER ACCURATE
  2. Fonerbooks - where someone very nicely lays out the ISBN landscape, and how to deal with the Bowker monopoly, and the connection to "Books in Print". crica 2005 (but apparently still valid). Bowker reminds me strongly of ARIN!
  3. LighteningSource - which is really a dead-end for me because I don't want print-on-demand.
Could it really be this hard to self-publish?! Not too terribly surprised, but a little disappointed, I set to work following the steps described in #1. Block of 10 ISBNs, $250, check. I dutifully downloaded the (Windows-only) mobi-pocket creator - which looks like it hasn't been touched since Windows 95 was hot stuff.

The manuscript was in a combination of (custom) InDesign and EPS - which I (imperfectly, I'm sure) converted to PDF. I dutifully added some meta data, generated the file, and then tried to publish via the Creator interface. I waited expectantly...

...to find out that mobi-pocket accounts are deprecated, and the entire process has been stream-lined and simplified.

It's called the Amazon Digital Text Platform and you don't need an ISBN (it's optional), you don't need to download conversion software, and you can use your existing Amazon user account. (Granted you have to add some data, like your Social Security number and a mailing address for royalty checks, but still...)

I had to fill out some metadata again, but it only took about 15 minutes to setup the account and upload the PDF of the manuscript. Amazon now says that the book is "in review" and theoretically you'll be able to buy it on Kindle any time now.

[Update: the book is published]

An Application Programmers Appeal

No comments:
My fellow application programmers,

Have you ever noticed how sometimes you learn on the run, slapping together code from working examples, and other times you take your time, really study the technology, savoring it and understanding its complexity? Have you noticed that there are some things which are far more amenable to one than to the other?

What if all learning starts out as "on the run" learning? You pull something into a project to make your life easier, to abstract away something that you don't want to do. You don't want to become an expert. If you can adapt an example its a good sign: you are playing to the libraries strengths, and don't really need to learn much about it for it to be useful. JodaTime might be a good example, or any of the Apache Commons.

Sometimes you pull something in and it works, but it leaves you feeling a little uncomfortable. There's just too much about it that you don't understand. It's a nagging itch that you want to scratch: what exactly is going on in there? Personally, I had this feeling with log4j - a deceptively simple little library with a surprising amount of depth. (And actually I'm still not entirely clear how commons logging, java.util.logging, and log4j all mesh together, even though I'm pretty sure we're talking about like 20 small classes).

Over time there are these "idea" technologies which just don't make sense unless you know the idea behind them. Spring is perhaps the best example of this. Learning the control flow of a Spring app without prior knowledge would be like learning French from a French dictionary. It seems like there are lots of idea tools out there, and more every day. Most of them are NOT amenable to quick uptake.

It would seem like most library authors would enjoy having you become an expert in their library, to become passionate about it, to understand it's delicate intricacies - especially the idea-driven tools. But often this just doesn't happen. Why not? Because when it does it is by persistent necessity rather than inclination. Consider Spring: people learn it because they use it for project after project. It is a persistent feature of the application landscape. It pays to learn it, and to learn it very well. But Sax? Or Java IO? Or Swing? You might need it occasionally, but there's no reason to dig in. Ignoring these libraries is a smart play.

The technology that seems to do the best are those rare gems which are both easy to adopt when you're in a hurry, which are broadly useful across a lot of projects, and which reward the student as they get deeper into it.

These observations drive a few conclusions. First, for an application programmer, be kind to yourself and recognize when you're running and gunning, and when you're taking your time to savor the moment. We will always experience a combination of both modes, and neither mode is better than the other, so don't berate yourself for not taking the time to learn that library better or using it to it's full potential. You didn't have time, and 99% of the other users didn't have time either. Second, for the library author, recognize and embrace those two modes because they are both important. Too often you make it difficult for us to use your libraries, expecting us to know magic incantations (class casts, method chains, constants) to accomplish straight-forward tasks. I have no doubt that the complexity is necessary to handle edge cases: but that's not why I'm using the library! I'm using it for the core case. Give me a utility class and mark it clearly as such (oh boy, nothing slows people down like trying to figure out dueling utility classes, abstractions on top of abstractions done with different idioms within the same project, and finding out that they were just facades over the *real* library). For God's sake use package level JavaDocs liberally to explain how the pieces go together with simple example code, and make some reference to applicable utility class in the lower level classes.

It's not easy being a Java programmer, and it never will be. Our language's expressivity is inherently (and intentionally) limited in the hopes that the compiler and other programmer tools can make our programs more error free. This trade-off between safety and freedom makes it all the more important that our libraries be incredibly well-designed, because we just don't have the linguistic freedom to mold your library to our liking.

Sincerely,
(Java)Josh

Going gung-ho on the yaught

No comments:
I feel good being rather more gung-ho about boating. Replacing an engine using the main mast and main sheet block, and, today, jumping into the marina water to remove a prop shaft...well, lets say that not everyone does things this way. John and I (well, mostly John) did it this way. It's good.

The cool part about it all is feeling less trepidation about things. Most boaters are vaguely uncomfortable with the true innards of their boats: the through-hulls, the packing glands, the ball valves, the bilges. The thinking is that if you ignore it, and nothing goes wrong, then you're fine. If someone tells you something is wrong on haul-out then you just pay them to fix it.

It's a little different for a restoration. I know what a packing gland is because I've removed one. I know exactly how much water will come into the boat if you take it off, because I've seen it. I know what a cutlass bearing is because it's a pain in the ass to pull a prop shaft through one. I know how zinc is mounted to a prop shaft because I've been underwater holding my breath to disassemble one. I know how sharp a prop is because I've had to manhandle one to get the prop shaft out.

And now I have to figure out a way to replace a cutlass bearing underwater. Based on info from the internet, I don't think it can be done. But it doesn't mean I'm not gonna try. I don't see why those instructions can't be executed underwater - with the exception of the dremel tool, which can easily be substituted.

I just need one of those hull cleaner's machines that forces water down to the diver. Or maybe I can build one myself. How hard could it be? Just need a regulator and an air pump.

A way to improve corporate ecological responsibility

No comments:
I propose a simple law who's purpose is to align the interests of executives with the interests of the communities in which their companies have great effect. If your company releases "safe" waste water, you must swim in it. If your company releases "safe" exhaust, you must breath it. If your company provides "healthy" food, you must eat it. I propose that there be spot checks (in the case of eating) and surprise drills (in the case of breathing and swimming) to avoid gaming the system.

This would also make a very entertaining reality-TV show, similar to "Undercover Boss" (which is a great idea, BTW). Imagine the old white executive having to put on a speedo and swim in the muck he's been releasing. Tell me executives wouldn't take a more...personal interest in making sure of the truth of their environmental impact!

(This idea was inspired by the gloop I saw in the riverbed behind the DWP power plant in Seal Beach. I thought to myself, wow, if the execs had to swim in that, it would be a lot cleaner.)

Don't like the idea of burning Korans? Here's what you can do.

No comments:
Don't like the idea of pastor Terry Jones burning the holy book believed in by like a billion people? Well, we can't really stop him, and we shouldn't - he's exercising free speech. But we can offset the loss:

Sep 11 2010 is now Print a Koran Day.

Here is the Facebook Page. Please like, comment, and print!

Jones will burn 200 Korans. How many can we print? Then we can find our local mosque and give them a replacement. Together we can offset the hate of one man, and show that we value and respect those who's beliefs differ from our own.

How to Jailbreak your iPhone - with mistakes.

No comments:
I had some spare time today, and I wanted to upgrade my iPhone to iOS4. I had heard that jailbreakme.com was making it super easy to do. So I let iTunes 10 upgrade my iPhone to iOS 4.0.2.

Big mistake. Jailbreakme.com doesn't work with 4.0.2, only with 4.0.1. Of course, you can't know that until it's too late.

Most people at this point would be screwed - you're upgraded, and the only way to use your phone is to go to AT&T with your tail between your legs and ask for a 2 year contract. Nicely. Luckily, I had, at some point, saved something called an "SHSH" with Cydia for iOS 3.1, which will allow me to downgrade to 4.0.1, and continue using my T-Mobile prepaid SIM card like God intended.

I haven't yet recovered, and I might not recover. In which case I'll have to forcibly switch to Android. Oh well.




A drawback to writing your own word-processor

No comments:
So I wanted to write a word-processor whose native format was plaintext or close to it. This was to support version control, portability, and tool unification. I hacked something together in an evening and have used it for a couple of stories. To get a PDF you do this:
  1. Write the story in Textile. Eclipse has an almost nice WYSIWYG editor for this.
  2. Load the story into my Viewer, which is a simple Ajax application that renders textile, applies CSS and generally gets it ready for printing.
  3. Print to PDF
This is actually not as bad as it sounds, and I have to say it's really nice to format a story (or any printed document really) using CSS. It's also really nice to write a story using the same tools I use to code. Code folding and syntax-highlighting is useful in stories, too! (Would be nice to define a "Convert to first person" refactoring?)

The big drawback is that, after printing, it's almost impossible to integrate edits made in pen back into the plaintext. It's a drawback I just didn't expect, which makes it interesting! With an ordinary word-processor you have 1-1 page correspondence, and you locate the edit spatially. This is totally lost with my method, and it's a deal breaker.

The only way is to scan the text for the nearest heading and then for paragraph breaks and then keywords. It's slow and difficult.

Interestingly, this is also something of a problem with Google Docs, which also does not render page breaks.

One work-around is to render the textile text in the same shape as the printed page. I haven't tried this and I don't want to talk myself out of it as a solution, but it seems like this would be pretty difficult to do correctly. Another work-around would be to actually do the editing within the browser. Of course, there the problem is that I'm no longer using friendly tools.

For now the roll-your-own open technology wordprocessor for stories is on the backburner. But who knows? I might resurrect it.

Lovely science coverage in the NTY: Seashells

No comments:
Just a quick mention. The NYT has a photo-heavy article on seashells, vaguely related to a book named, "The Book of Shells" by M. G. Harasewych and Fabio Moretzsohn. I like the elegant Crispate Scissurelle (Anatoma Crispata) and the stunningly beautiful Matchless Cone (Conus Cedonulli.

Looking at these pictures, I couldn't help but think about complexity how recursion so beautifully addresses such problems. Recursion gives you simplicity and complexity: that there is some small amount of code being executed to create these shapes, ordering vast numbers of molecules into a coherent shape.

An important lesson for American innovation: will we listen?

No comments:
NTP Inc. (wiki - they don't have a website) "holds a number of patents but doesn't manufacture any products" according to the Wall Street Journal (wsj.com). And it has filed suite against Apple, Google, HTC, LG, Microsoft and Motorola over wireless email. Blackberry has already settled a similar case with NTP for $612.5 million.

With the priviso that I know only as much about this case as was reported in the WSJ, I'd say we have something to learn. When I say "we" I mean "congress" and when I say "lesson" I mean "patent reform".

In the beginning, an artisan could make money by selling products. This was fine as long as the product was difficult to make: there was no point in protecting the design when the method of manufacture was the barrier-to-entry for competitors.

Over time, the ability to manufacture or copy a device has become easier and easier. Artisans, now called engineers, were less encouraged to innovate because, at best, they would only be able to produce a few of the items before the design was copied.

And so the patent system was invented to protect intellectual property independent of the specific devices. It accomplishes this by protecting the idea behind the design of a product. If a product is created with the same backing idea as another, then it's fair game for a lawsuit.

What's happening now is that people are taking out patents on ideas they do not intend to develop into products. They then attack the companies that turn the idea (which is almost always independantly derived) into an economically viable product. This creates a society which rewards documenting ideas, and badly punishes executing an idea. So, if we want to live in a world of thumb-twiddlers, by all means, carry on.

It seems to be happening more with software patents, but I'm sure it's happened during the entire history of the patent system. It's hard for me to imagine that the patent system doesn't have some provision limiting remedies to those who never bother to turn an idea into a product, viable or not.

The other problem with the system is complexity. Patent law is complex. Proving prior art is notoriously complex. Patent's should be simpler to get, to verify, and to litigate over. The IP system in this country needs a serious overhaul.

Why am I concerned about it? I'm an independant inventor of no great note. The entities most at risk are those with deep pockets: companies like the defendants in the NTP Inc. lawsuit. If anything I'm more likely to benefit from patent trolling myself!

This might sound naive, but I'm against patent trolling because it's bad for society. Yes, I want to invent things and get paid for it (and get paid handsomely!). But I want to do it fairly: by getting a patent, and either developing it or shopping around for licensees. I wouldn't be able to live with myself if I filed a patent and sat on it for a few years until someone else came up with the same idea and made millions, and then I come out of the woodwork with a lawsuit. "Ha!" I say, "I have a patent on that!"

Here are some related links:

A writers printer

2 comments:
Brother HL-2140orororHP LaserJet Pro P1100 Printer series - Black and White Laser PrintersorHP OfficeJet H470WBT  Mobile Color Inkjet  Printer with BatteryorCanon PIXMA™Compact iP100 Portable Photo Printer

These are all small, monochrome laser printers, around the $150 mark, with the exception of the last two which is $330 and battery powered, and $230 without a battery, but very small. (I love the idea of taking a printer with me to the coffee shop!)

A great upgrade

No comments:
Seagate Momentus XT 500GB 2.5" SATA 3.0Gb/s with NCQ Solid State Hybrid Drive -Bare DriveI'm super happy about an upgrade I did last night, and encourage everyone out there to consider it. I installed a Seagate Momentus X25 hybrid SSD drive ($145 incl tax from NewEgg) into my uni-body Mac Book. It was slightly more involved (and expensive) than I expected, but I am so pleased with the result.

My first attempt at upgrading involved a no-name USB to SATA cable thing. It didn't work - the drive would mount for a few minutes then forcibly unmount, with or without the external powersupply. I wasted a few hours with this approach.

Western Digital My Passport SE 1TB 2.5" USB 2.0 Ultra-portable External Hard Drive for MacThe right way to do the upgrade is with a backup-restore. Which requires a third hard-drive. For this I purchased a "Western Digital My Passport SE 1TB 2.5" USB 2.0 Ultra-portable External Hard Drive for Mac Model WDBABW0010BSL-NESN" (say that 10x fast!). It was not cheap at $200 from Best Buy (including tax). But it's a small, pretty little device that doesn't need an external power supply. I then used Time Machine to do a complete backup, which took 7 hours for 230GB of data.

Physical installation was tougher than most laptops, but not by much. You need a tiny philips head and a torx T-6 tool. It's pretty straightforward and took about 10 minutes.

To restore you need your startup disk. This is a critical piece and I bet lack of it will stymie many would-be upgraders. Select Utilities|Restore from Time Machine Backup, and wait. I was a bit freaked out by the extended white screen on boot, but apparently that's normal. Restore took about 5 hours.

This drive is freakin' fast. My whole machine is noticeably snappier. I didn't want to buy the external USB drive, but I'm kinda glad I did: it's a nice bit of insurance. (I was slightly tempted to get a Time Capsule, which includes an 802.11n router with a 1TB drive, but decided against because of the $340 price tag, and the almost certainly slower performance.)