Thursday, December 29, 2011

Euler

I finally got around to doing what I intended to do over the break, which was to make a little progress on project euler. I knocked out a few problems today, and will likely make some more progress between now and the 9th, when I go back to class. It's a useful activity if only to remember how to write what you mean when you have an idea and need a computer to do the boring parts. It's a challenging list of problems if you don't have a great mathematical preparation (guilty as charged). The best part is of course unlocking the forums, to see how others solved the same problem. Sometimes it's a radically different approach.

Thursday, December 22, 2011

Gloves and Mittens

Watching children dismantle the careful barriers their parents erect to keep them warm reminds me how much we all dislike wearing gloves. Watching babies removes their socks or booties makes me wonder how long it takes a young person to learn to ignore the discomfort of wearing shoes. Looking at the footwear of the women downtown makes me think we may have taken a necessary process far beyond its original intent. Those can't be comfortable at all, and seem not to provide much protection from the environment. The open-toed dress shoe is a strange beast.

Tuesday, December 20, 2011

Bridges

One of the many simple ideas of economics is the principle of diminishing marginal utility. A single bridge linking two sides of the river has a very high marginal utility, boosting trade from one side to the other, opening opportunities to residents of both sides to conveniently work, shop or play on the other bank. However, any economic benefits derived from the first bridge will need to be revised downward for each additional bridge. Downtown Chicago has an enormous network of bridges over a rather small river, with the business core spilling over to the north and west from the loop. More or less every street in the central district bridges the river, since the river magically makes a 90 degree turn at wolf point, so that the loop is bounded by water on 3 sides. Although the short length of these bridges made construction less costly than longer bridges (Astoria or San Francisco), each bridge costs money to maintain, at approximately fixed levels (a low value bridge is likely just as troublesome to operate each year). I can see in the future a number of these being abandoned, and traffic routed over some of the remaining ones.

The government highway inspectors lament the sad state of the network of highway overpasses and bridges in the US, after considerable scrutiny followed the collapse of the I-35W Mississippi crossing in Minneapolis. The obvious answer is to pour more federal and state funds into repair and replacement of an aging infrastructure. Which is great, since the federal government of the US, just like that of Italy, Greece, Ireland, Iceland, Spain, Mexico and all the other countries of the world, can just print money indefinitely, and use its sterling credit rating to finance an over-sized network of roadways. Hmm...

Sunday, December 18, 2011

Recent Thoughts

So, this morning I was reading an article in this month's Harpers, where a woman had traveled to Cuernavaca with her daughter to learn Spanish. She noted the immediacy of the dead in the life of the host family. I started to think that maybe a great thing about having decidedly distant places for the afterlife is that the dead are not in the backyard complaining to you, wondering why no one cleans their graves, and generally being troublesome for the living. It may be that the progress of Christianity and its cosmology has allowed more freedom from the ancestors.

Second, I occasionally find myself thinking back to 'The Stainless Steel Rat Gets Drafted' and the system of Individual Mutualism. When I was 12 (and read this), the existence of a long line of anarchist thinkers was far from my imagination, so any relation to historical mutualist theory was lost to me. I think I may want to add some of these 19th century thinkers, probably Proudhon more than Kropotkin to my reading list. It's a shame that anarchy and its philosophy have been hidden from young people by rather loud shouts from metal heads (do these still exist?). I think reading Chernyshevsky's 'What is to be Done' over my vacation this summer may have rekindled some interest in the matter. Any technical measures to bring this about should do a little reading into the history of mutual aid or friendly societies as they were known 200 years ago in the US. The big advantage of small scale local social units is that we won't require a revolution in the state to effect the kind of change and organization required to put these ideas into practice.

Unfortunately, the state and finance are balanced in favor of a debt driven consumption system, as anyone who has tried to get a mortgage for a coop can attest. My understanding is that a coop is owned jointly by the tenants, so unlike a condo, cannot be foreclosed at the unit level, only the whole building. This makes bankers hesitant to lend without security. It makes me wonder what other types of organizing property are prevented by the structure of lending and the legal system upholding property.

Monday, December 05, 2011

color themes

Frankly I'm a little excited for emacs 24 to be released (I occasionally build and toy with the trunk to see what's coming). I'm really happy that elpa is going to be standard, color-themes is preinstalled, and life is generally good. Plus this will be the first time I actually care to maintain my .emacs in a version aware fashion, since I'm not sure there aren't things in 23 that I can't live without.

But anyway, I'm using solarized-dark, which I find I almost can't live without now. I would probably give the author a few dollars if he somehow held me hostage, it's that nice. It was worth installing color themes in 23 just to get this feature working.

A million little languages

When we drop down to the algorithm level, I think OO can seriously thwart reuse. In particular, the use of objects to represent simple informational data is almost criminal in its generation of per-piece-of-information micro-languages, i.e. the class methods, versus far more powerful, declarative, and generic methods like relational algebra. Inventing a class with its own interface to hold a piece of information is like inventing a new language to write every short story. This is anti-reuse, and, I think, results in an explosion of code in typical OO applications.

Rich Hickey, from Code Quarterly.

Sunday, December 04, 2011

Republic of Letters

So I thought recently about all the books I've had to read, and those I've read for pleasure. I'll omit purely technical works and focus on literature.
High School Assigned Readings
  • Romeo and Juliet
  • Julius Caesar
  • As I Lay Dying
  • Things Fall Apart
  • The Awakening
  • The Old Man and the Sea
  • Ethan Frome (didn't read it)
  • The Red Badge of Courage (also didn't read it)
  • Fahrenheit 451
  • Animal Farm
  • Thus Spake Zarathustra (I'd read it once and followed up to do a term paper)
College assigned readings
  • Hamlet
  • Henry V
  • History of the Peloponnesian War
  • Crito
  • Phaedo
  • Apology
  • Symposium
Personal Reading (In no particular order)
  • The Trial
  • The Castle
  • Amerika
  • The Stranger
  • Man in Revolt
  • Essays of Montaigne
  • Republic
  • Why I am Not a Christian
  • Power
  • Conquest of Happiness
  • Marriage and Morals
  • The House of Mirth
  • Farewell to Arms
  • In Our Time
  • Mrs Dalloway
  • The Years
  • Orlando
  • To the Lighthouse
  • This Side of Paradise
  • Adam Bede
  • Middlemarch
  • Silas Marner
  • Moll Flanders
  • Felix Holt, the Radical
  • Daniel Deronda
  • Vanity Fair
  • Pride and Prejudice
  • Emma
  • Jane Eyre
  • Wuthering Heights
  • Sense and Sensibility
  • Tess of the D'Urbervilles
  • Rameau's Nephew
  • D'Alembert's Dream
  • The Gay Science
  • Geneology of Morals
  • Ecce Homo
  • Beyond Good and Evil
  • The Antichrist
  • Crime and Punishment
  • Anna Karenina
  • Brothers Karamazov
  • The Merchant of Venice
  • King Lear
  • Macbeth
  • Titus Andonicus
  • Timon of Athens
  • Pericles
  • Dead Souls
  • The Nose, The Overcoat, How Ivan Fyodorovich Quarreled with Ivan Nikiforovitch
  • Plays of Aeschylus
  • Plays of Sophocles
  • Plays of Euripides
  • Brideshead Revisited
  • Devil in Paradise
  • Tropic of Cancer
  • Stand Still Like the Hummingbird
  • The Air Conditioned Nightmare
  • Big Sur and the Oranges of Hieronymus Bosch
  • The Crime of Father Amaro
  • The Master and Margarita
  • Faust (Goethe's version)
  • Angle of Repose
  • The Mill on the Floss
  • 1984
  • Point Counter Point
  • Island
  • Brave New World
  • My Antonia
  • Hard Times
  • Great Expectations
  • Our Mutual Friend
  • Bleak House
  • Franny and Zooey
  • Nine Stories
  • Dubliners
  • Foundation/Robot cycle
  • Dune cycle

Saturday, December 03, 2011

github

Well, I added an account (and some code from Project Euler plus some coursework) on github. I will see how useful this becomes to me. I'm not sure how the public keys will work if I commit as the same person from multiple machines. I will have to experiment with that further.

Friday, December 02, 2011

Resolution

Whereas chickpeas have firm, non-porous outer husks.
Whereas chickpeas have high moisture content within.
Whereas microwave ovens excited water molecules more efficiently than anything else.
Whereas heated water expands and steams, pushing outward material around it.
Whereas a steaming chickpea tends to crackle and pop.
Whereas conventional ovens are perfectly capable of heating delicious foods without massive messes.
Whereas pots are dishwasher safe, while microwaves are hard to fit into a dishwasher.
Finally, whereas once is enough to learn our lesson.

Therefore, let us resolve to not place a plate of uncovered chickpeas in the microwave, regardless of how much time we may believe we'll be saving. Let us further resolve to just take a sharpie and cross off any references to the microwave oven.

Saturday, November 26, 2011

gcc does binary search in switch (not nested if blocks)

So I started looking at Write Great Code, and one of the examples he offers is a comparison of a switch(x) versus if(x==1) else if (x==2) else if ... there were 1-4 matching and a default case.

so I threw that together into a dummy source file, asked for an assembly output, and looked. I was a little surprised to see this:
movl -4(%rbp), %eax
cmpl $2, %eax
je .L4
cmpl $2, %eax
jg .L7
cmpl $1, %eax
je .L3
jmp .L2
.L7:
cmpl $3, %eax
je .L5
cmpl $4, %eax
je .L6
jmp .L2

It looks like it peeks into our variable (argc gets loaded into eax for this example) and starts a binary search of the possible literal values it expects. I didn't turn on any extra optimizations, so I assume this is just a practical good idea. I feel slightly less dumb (at the machine level) feeding ploddingly literal switch statements to gcc now, though I still feel like a chump typing them.

The nested if blocks follow a more familiar pattern... is it 1? well, is it 2? Ok, is it 3? Hmm, what about 4? Well, I give up, lets take this else else else else action. I guess its nice to know this. It may be a reason only a literal can be used in a switch, that the language designers were expecting this type of optimization on the back end.

My take-away from this is that if there is a higher probability of some options, nested if/else blocks make sense. If the possibilities are equally likely, switch makes sense. If the purpose is to guard against bad things (dereferencing a null pointer) if/else is a necessity, and it's proper that gcc didn't optimize it away (it would be disastrous if it did!)

Javascript and Flash

It's funny how little of the modern web works when you turn noscript on. It's refreshing to see all the broken assumptions developers have (especially the number of sources a script might come from). I imagine that a graceful fallback (fairly sure weblocks does this, and google has a broad range of feature levels for their services) in the absence of javascript would be a usability requirement for any serious site. The number of pages with inescapable flash intro splash screens, or worse still, entire ui's in flash, seems to be on a decline. That's good...

Thoughts on Control Software

I used to work for an electronic controls company, and I recently started thinking big picture about how the software was laid out. When I was knee deep in the details, I had a mind full of notions about what was going on. Fundamentally, I think this is my takeaway.

Object Oriented design makes a good deal of sense when you really are modeling the behavior of physical objects. Many of the basic principles were there, like a powered down smalltalk system. The design tools were essentially object databases which were compiled into microcode for the appropriate hardware. On the large scale (full building to campus scale) systems, the compartmentalization was fairly rational. So to design a building, you divide it into floors or other reasonable real world divisions (maybe an exterior area for all outdoor controls), then divide those into rooms or suites of rooms. Within a room, you add controls and controllable objects (lights in my case, but it could easily have been other items). Some systems provided default behavior for free, which could be customized afterward (a light switch in a room automatically turns lights on and off until you program it otherwise). Some systems did not do this at all, but had a much richer set of allowable programming. For example, the residential system used a separate hardware and software system targeted to third party integrators, while the commercial system was essentially an internal tool. Building the database essentially consisted in reading the construction diagrams and adding each unit and its function into the database.

This model (Object Oriented drag and drop database tool) had its limitations. For example, a common residential control had a large on/off button, which supported a double-tap as a special command, and a raise/lower rocker off to one side. The raise lower were likely to be left alone, since there are few sensible overrides, but double-tap could be adjusted to do just about anything. Just about... It seems one downfall of the OO ideology is that some objects support a different set of methods than others. So while a multibutton keypad could handle fairly complex conditional behavior, this was not allowed in the single button toggle switch, even from double tap. This behavior was not extensible at runtime. Many of the buttons allowed chaining other buttons (sending a keypress event) to allow some impressive logic. Some types of controls did not support this 'dolikepress control key' method. Sadly, the workaround was that it did allow sending rs232 commands from the onboard serial port. I once had to install a few loopback wires to tie com1 to com2 so that the second class control could implement first class behavior (using the rs232 serial command to send a press event to a key which could handle the command I needed). This of course was done with cryptic string literals. Try showing someone how that's done and expecting them to be able to replicate it.

One other thing I saw while I was there was the evolution of the granularity of control. The company moved from a circuit based centralized concept to a distributed item level design (with a mix and some tension between cabling controls to the nearest connected device or back to a central hub). This introduced a new level of complexity (in that rather than addressing a unit as 12, attaching it to wire 3 running back to the hub, it now was indirectly accessed as the control attached to device 20 on link 4, etc) but freed up the electrical topology and cut costs of cabling for installers. I see how on the business end this made a great deal of sense. There also was a general tendency to move away from addressing (via dip switches, in software menus etc) to serial number addressing. Unfortunately, the database design ideas still required a set address/location pair for the design, and some time was spent on each installation associating control serial numbers with database id's. The goal was to make replacement simple, with only removal and replacement sufficient to allow the hub to infer the new devices behavior, but this had problems if there was more than one failed item on a cable (since there could be no unambiguous solution, the system did nothing) or multiple replacements at a time. This led to some interesting hangups where power was removed from a portion of a floor (not uncommon in construction). In the end, some manual intervention in the software was required to overcome this hurdle (in the several years since I left, I imagine this has been corrected, since manpower costs money).

On the whole, although I found the drag and drop available actions easy to explain, but it failed to abstract away the details, since the desire to maintain programmability and flexibility (yes, we can do that) outweighed the need to provide an intuitive and flexible system for end users. Really, the end user only wants the lights to turn on when he hits a button, and the support/maintenance team that inherits a beast of a control system is used to dealing with 10 different hardware control platforms.

I think the BACnet integrators are making a good deal of headway into alleviating this pain for the building managers, though not coming from a ladder diagram world, I found programming with Vizio a little queer. But having one software control system to view AC, alarms, security, lights, and handle all timed control events is a big win for the maintenance staff.

Friday, November 18, 2011

Google Nonsense

So I have this recollection (badly) of something I read, that some people would rather spend a lifetime making a X second process into a Y < X second process, and these are the real agents of change in the world. It's totally botched, google wants to direct me to 20 pages about personal finance, miscellaneously grouped quotes don't help. So I obviously misremember some wonderful comment about engineering perfectionists, and if anyone finds this and would love to help, it would be much appreciated.

Arlo Guthrie

And friends, somewhere in Washington enshrined in some little folder, is a study in black and white of my fingerprints.
...
And friends they may thinks it's a movement.

Why don't more people sing Alice's Restaurant on Thanksgiving? Grr, Sometimes I miss you, Kevin.

What's wrong with jobs postings?

Why not require strong problem-solving skills and desire real-time multithreaded c++ experience? I can see requiring strong communication skills but desiring excellent ones, but this list is indicative of what's wrong with job postings. I would think that a person with 'strong problem solving skills' would be able to identify how they were under-qualified in ASP.net and rectify it quickly, while someone with FIX and ASP experience who somehow was weak in communication and problem solving would fail to correct the remainder of their (doubtless numerous) deficits, since they perhaps fail to identify them.

Were I hiring, I would move ability to communicate, work in a team, solve problems seriously to the top of the requirements list, and figure the rest is trainable for desirable people, in other words, desirable... I understand business is tricky, there is an army of duds out there trying to find a job, and your job's on the line when these things fall through--but, really, who writes these things? Who applies? Liars and folks who won't work there long. Seriously, pay 10-20% less and get someone who will learn things your way, rather than hoping the 'ready day one' candidate who shows up knowing you have only money to offer them (rather than seeking to learn from your long heritage of market leadership) will apply in a timely manner and settle for the proper salary.

Qualifications and Education Requirements:

· Real-time, multithreaded C++ software development using data structures and performance optimization techniques

· Knowledge of Financial Information Exchange (FIX) protocol

· System Life Cycle experience, data storage strategies

· Experience Derivative trading system development.

· Strong written/verbal communication skills – particularly interfacing with customers

· Bachelors’ degree in Computer Science or related field required. Masters preferred

One year of experience minimum

Preferred Skills:

Strong problem solving and analytical skills.
Excellent communication skills.
Professional work ethic and a team contributor.

Thursday, November 17, 2011

Playing around with graphviz

In my data structures class we've been talking about binary trees. One of the example programs used a stack and space counting to display the tree to the console in a very fortran way. I mentioned to my instructor that using dot would be much simpler, just generate the dot file, hand it off to graphviz, and read the svg/png when you've finished.

Initial experiments were unsatisfying, since a node with only one child tends to have a vertical bar straight down, giving no indication which link (left or right) it is attached to. So I threw some color in, with blue indicating a left/less than link, and red indicating a right/greater than link. This was simple and easy to see. I couldn't shake the suspicion that there was a way to push the links to the right sides, and started thinking about making tables within the records with named ports, but this seemed to be more trouble than it's worth, and I didn't understand why the example code worked, but my hand edited version went unrecognized. Then I remembered reading that invisible edges to invisible nodes will make graphviz count more nodes at a level than there are. Observe the 'balanced' image:



and the unbalanced original:


Honestly, I prefer the density of the original to the strange, warped feeling of the corrected version. In many cases, the links still point downward (especially on outer branches pointing in), but some sense of angular proportion can be felt. With the original, most of the nodes at any given depth are bunched together, giving a sense of feel for the completeness of that level, while the corrected/balanced image has (artificially inserted) gaps to create angular distinctions between left and right, which makes seeing across more difficult.

A rather weird twist, I tried only inserting dummy nodes on the left and leaving the right alone to see what might happen. This is from a different data set, so the overall shape is different, but see how wrong this became:

Sunday, November 06, 2011

While I'm at it (complaining)

I really think Marmalade is great (emacs package site). I really wish installed packages weren't shown as installed if they error out. But getting up to speed quickly (starter-kit) is great, and it works everywhere... makes a more consistent ui possible when you work on multiple machines. It's almost as pretty as quicklisp for elisp packages. And again, after an upgrade, I find that ditching as many of the native packages in the lisp arena as possible is a must. Step 1, install sbcl. Step 2, build a fresh and current sbcl, step 3, uninstall sbcl, redirect /usr/bin/lisp to /usr/local/bin/sbcl. Uninstall common-lisp controller, install slime/swank, install quicklisp, and proceed with the rest of the world.

ELPA looks like a nice second if for some reason you aren't nearly as excited about marmalade as I am. Really, including failed packages as installed is my only gripe.

Seriously, Ubuntu?

Every six months I foolishly endure another distribution update from the jokers at Canonical. This fall's oneiric ocelot was no lack of surprises. For once, I didn't revert to classic, and have struggled to work through unity (I think there are people who like this, I doubt they use a trackball). Although I am growing less opposed to the poorly thought out hovering scrollbar, I still am not able to adjust.

My number one complaint, besides the absence of the nice footprint menu with a categorical grouping of installed applications, is the second class status of the terminal, perhaps the one program I use the most. Open a terminal (if you didn't figure this out, it's C-M-t, now switch applications to something else, M-tab, now try to get your terminal back? It's absolutely invisible, like a second class citizen. Clip it to the Launcher (dock). Can't see the window list? Not there... open 20 terminals, try to get to any of them... Curiously, they had to purposefully exclude this, since a dumb old xterm works just fine and is a first class citizen.

Really, I think the move to netbook optimized interfaces is going to leave unhappy dinosaurs like me migrating to a sane environment. I started using Window Maker again on my primary laptop (still on 11.04 since I see no reason to ruin two computers) and apart from manually having to handle pm-hibernate and nm-applet, it's rock solid and a positive environment. I can live with compiz not making my windows wobble while I move them.

I guess it's user friendly to make the terminal a one shot deal, but that's what M-F2 used to do, rather than conjuring a powerless launcher that looks like a heads up display for an action game. It used to call up a 'run' dialog. Hail the 'run' dialog.

Sunday, October 23, 2011

More reasons why C++ gives me headaches

This gem is from the wikibook More C++ Idioms, to get the address without needing a valid operator&. Enjoy the cast once, cast twice, wait, I didn't mean char at all goodness.


template
T * addressof(T & v)
{
return reinterpret_cast(& const_cast(reinterpret_cast(v)));
}

Friday, October 21, 2011

Don Quixote

Just bought a ticket to see Don Quixote this Sunday. Anyone? $40 for the Joffrey Ballet? I'll just go alone.

Wednesday, October 19, 2011

Contemplating Spring

Well, I'm thinking these are the things I'd like to take (from what's available).
I need Abstract Algebra and Writing (required), and I think I'll add to that Algorithms, Theory of Computation, Graph Theory, and Financial Mathematics. Then I believe I'm done. There are a hundred things I think I'd have liked to take, given the time, and perhaps a nice graduate school will consider my case, but if not, it's off to find work.

Saturday, October 08, 2011

Intermediate Values

We were talking about the intermediate value theorem (can't get from here to there without sometime being in between them) in my real analysis class and the thought occurred to me that the interval is a very restrictive notion. How does this generalise to more dimensions?

Is there a natural way to extend the IVT beyond real valued functions? I could see that the length/radius of a set of points in R^2 or C would have this property (since we have length in R, and the curve is continuous implies the changes in its distance are continuous), but I don't see what it means for say the helix f:R-->R^3 where f(t)=(cos(t), sin(t), t) except when considered as three separate continuous functions. (i.e., let a = 0, b = 2*pi, and see that nothing more can be said than that there exist z values between 0 and pi for which the z component of f(t) obeys the intermediate value property).

Is the problem in the notion of an interval, or of betweenness? Is there a better way to describe this phenomenon when talking about parameterised curves?

Saturday, October 01, 2011

Seriously, Emacs is a winner

Anyone using rfcview? This is about as useful as an umbrella in a rain shower! The fact that I just give it a number, and it fetches a well formatted text file for me is a feeling of power. When was the last time your editor gave you a feeling of power.

The gdb integration is superb, and I'm on my way to making it my primary email editor (largely due to finger inertia, after a few hours of write compile debug, it's easy to forget how to use more 'friendly' software.) How do you kill a line in Evolution, anyway?

I recently forced w3m to start working, which is pretty slick as far as non-javascript powered browsers go. It's a lot prettier than lynx.

As if slime weren't reason enough.

Sunday, September 18, 2011

Quicklisp

I think Quicklisp is incredible. I may have to add this

(ql:update-all-dists)

to my list of things to do once in a while. If only I had an automatic alert when a new sbcl version was released. Painful is the way when you are one or two point releases back.

Tuesday, August 23, 2011

Sometimes I'm ashamed

to write such ugly things. This clearly was a trial-and-error design. Strip away all the comments, and mourn your 'cleverness' ever after.

long fib(long n){
long a[3] = {1, 0, 1};
int i = 1;
while(n > 0) {
a[(i+2)%3] = a[(i + 1)%3] + a[i%3];
i = (i+1)%3;
n--;
}
return a[i];
}


Of course, you could define a class of integers mod n, and replace int i with
modular i = new modular(3);

Saturday, August 13, 2011

Adwords sometimes gets me laughing



Notice the ad? I keep clicking on the spam folder, and I keep getting great recipe ideas for Hormel's magic meat.

Friday, August 12, 2011

C++

It looks like I will have to add STL/C++ to my repertoire to deal with the Data Structures class I start in a little over a week. I picked up the second edition of Stroustrap's book (dated but beautiful) for $2.5 from a local used book store and will chew through it. Sometimes it's funny how much I enjoy dead tree editions of computer books, even with the lack of copy paste. I have an electronic 3rd edition, but I think I'll get through this in the meantime.

So, when playing around with Java over the years, I've actually found BlueJ to be one of the best working environments, largely due to the support for runtime creation of objects, and allowing exploratory programming. I think I'll use a mix of Code::Blocks and good old Emacs for the time being, but does a better solution exist? One in which files are presented as the parts of a class hierarchy and methods can be invoked in an interpreter. Code::Blocks seems straightforward enough for creation of boilerplate constructors, destructors, assignment operator, and copy constructors, automatically making headers and implementation files and including header guards.

As an aside, is there an IDE with built in support for TDD in C++? It seems like TDD might be my next side adventure in self-growth. I recently saw a few people from 8th Light give a live demo in python and ruby of a simple TDD walk-through for a trivial change counter. Having never taken principled software creation practices seriously (no more than sane names and proper decomposition of functionality, an 1970's level solution), this was intriguing. Not going to run out and buy Uncle Bob's books, but I'd like to see what proper unit test first program design feels like.

Constantly I need to suppress the 'knowledge' that C++ is a steaming pile of horse manure to dive forward and gain competency. Really, could you find a way to write const any more times in a declaration? Isn't there a better semantics for specifying this sort of compiler hint? One const to say that the arguments are unchanged, one const to say that the object is unchanged, one const to say that the return type is immutable. All using the same word, all dependent on context. I pity the programmers who are forced to think like the compiler to get work done. Although I was reading a talk by Kiczales Why are Black Boxes so Hard to Reuse where he points out numerous times the danger in an implementation deciding in advance what a typical use case will be.

Tuesday, August 09, 2011

Music

I've been toying with a few music services lately (I used to enjoy last.fm but it seems to have stagnated lately, and the gnome move away from rhythmbox leaves a poor substitute in banshee for this service.)

So two that I have tried are shuffler.fm and wearehunted.com, both installable via the chrome web store. At first I thought We are hunted was really good, but I get a little sad about the selection (seems to be finite, and non-adaptive to rating). Of course, there may a dozen ways to personalize my experience that I haven't explored, but I haven't toyed too much with it.

Shuffler.fm seems to aggregate music blogs, and pick music linked from them. The plus side of this is that a good deal of the music is downloadable while you listen. Since I'm one of the five people on the planet without an iPhone and permanent internet connection, downloads still seem like a great idea to me (it turns out that buying 1-2 terabytes of storage per year is cheaper than mobile internet).

All in all, I appreciate being exposed to these services, and the new music they are introducing to my ears.

Sunday, July 24, 2011

Troubling

I just noticed that my bag of coffee beans from Aldi has clever badges stating that it is a gluten and lactose free food. I'm suddenly reminded of xkcd's take on this trend .

Saturday, July 23, 2011

Sadness

One of the worst parts about running a nonstandard operating system on a nonstandard architecture is compiled packages. Amazon correctly noticed I appeared to be running linux, and went more than half way in offering a compiled .deb file for debian/ubuntu. Alas, 4 seconds later, I find it's a 32 bit package, and can't find a 64 bit package. A few fumbling --force-architecture mistakes later with dpkg, and I now have installed a mess of broken dependencies.

How did I dig myself out of this? Launch wine, install firefox for windows, install cloud player/mp3 downloader, and go. Interestingly, wine (as close as I can tell) only supports win32, while my linux seems to choke on dynamically linked 32 bit executables. Years ago I had a debian 32 bit sandbox installed in a chroot environment for dealing with this, but the sands of time make even Ozymandias look weak.

Tuesday, July 19, 2011

Oh, L No!

Speak English or Cry

I was coming home from work on a weekday afternoon, 5:45 or so. The train was pretty packed — all seats taken, lots of people standing, but not crammed in tight. There was a guy near me sitting in one of the single seats. Late 40s, balding, librarian glasses, very old button-down shirt and faded jeans, the uniform of someone who’s worked 30+ years in one place. He’s staring out of the window, livid, clearly came onto the train with his own sets of worries.

Standing above him in the aisle were two early 20s men speaking in Spanish. Not loud, just conversational, no louder or quieter than anyone else on the train.

All of a sudden, the man turns to them, eyes bulging, teeth gritted, nearly in tears, and he loudly hisses “SPEEEEAAAAK…ENGLIISSSSSSSHHHHHH!!!!”

The two men, without missing a beat, start speaking English, but a very exaggerated, “Masterpiece Theatre”-style English. “Oh, very well…would this be the manner of speaking which I ought to be engaging upon, sir?” etc. They continued their conversation to each other in this exaggerated English accent for the rest of the ride, while the man stared out the window, fuming but clearly embarrassed at his outburst.

Sunday, July 17, 2011

Street Fighting Mathematics

I stumbled on this book and course (18.098) available both in print from MIT Press and as a download (earlier edition) from OCW here . I'm perusing it a little now, if it contains half of the heuristic greatness it says it does, I expect to enjoy this and gain a good deal from it. In math, so much effort is wasted on fruitless approaches that a little reasoning would rule out early.

So, thanks to the author Sanjoy Mahajan for making this available to us all.

Thursday, July 14, 2011

Priority Inbox

I'm always surprised when Gmail adds a new feature, as I mainly use IMAP with evolution. So I had to do a little reading to understand why I had a new folder called Important. I think I read about it a few weeks ago, and didn't think much of it. I don't know how much use I will get out of this, but it's an interesting idea. The problem I think is that I tend to save and read a lot of nonsense, which is anathema to the perceived use pattern they are training against. However, the evolution mail clients 'mark as important' doesn't equate to gmail's mark as important, so I think I may have to just ignore it.

Maybe it's because I have too much time, but I often do read all the lottery winning and bank transfer appeals. When a Nigerian prince finds his way to the important folder, I will truly have defeated the system (not the case, thankfully).

Monday, July 11, 2011

Alphascript Publishing

I'm horrified that someone has the brilliant idea to bind 80 pages of wikipedia content and sell it for $40. I'm impressed that someone used the terms of free documentation licensing to make a buck, but even with a giant medallion on the cover stating that it's 'quality content from wikipedia', I think I feel bad for the first dozen people who shell out for this. Don't I recall a nice little pocket wikipedia device running from a sd-card priced about $100? Curiously, the publisher's office is in Mauritius (a tiny island country off the coast of Africa), never suspected that to be a hotbed of literary creativity.

I hope their 'portfolio' includes more than just reprinting free content at high prices...

Philosophy
Nearly all media worldwide – such as newspapers, magazines, TV – use internet for their researches and as a basis for their texts. This is exactly what Alphascript publishing does. And we go even further: with the Wikipedia-texts at free disposal we create books on interesting topics.
There is hardly another platform for quick and better processing of information than by Wikipedia – and this is too for the benefit of the Alphascript publishing-readers who want to be informed on a specific subject. Of course you can have online everything free of charge, but for good reason you have decided for a book. Alphascript publishing is internet in form of a book. There can hardly be a faster process.

Friday, June 10, 2011

Finally a nice program!

Java Decompiler

Having seen the mess that 'reverse compilers' or disassemblers typically provide, I am awestruck at the quality of this Java decompiler. Now I just need to avoid getting into trouble by peeking where I shouldn't.

If anyone cares to try it, the installation (or lack thereof, unpack and execute) was a breeze, and the product is beautiful.

Wednesday, June 01, 2011

Blast from the Past

Don't bother asking why, or how, but I was finally getting around to setting up shared key authentication for the accounts I use, and I launched a help location from Sun Project Workshop (itself running as an inferior process from XEmacs). Up pops Netscape 3.0 for Solaris.

It must be that nobody test for Netscape 3 compatibility anymore, since every external site I went to had multiple issues (Did php exist in 1996?) Javascript must have changed quite a bit since then, and SSL was pretty much not ready to be used (couldn't start encrypted connections). I didn't check if the version of netscape had valid 128 bit encryption, there was a painfully long period of 40 bit export restrictions.





Sunday, May 29, 2011

Dying Suburbs?

Crains Chicago Special Report

Man, my overpriced condo seems like a smarter idea every year. (Not minding four and a half dollar gas...)
Horrible Moments in the History of Philosophy

"411 and 404 B.C.E.- Students of Socrates set about demonstrating their teacher's key claim that the study of philosophy makes one more ethical. First, they destroy religious statues and help the Spartans defeat their own city state of Athens, and then they institute murderous reigns of blood upon the struggling democracy. This is all topped off by establishing violently class-based dictatorships. Sadly, both dictatorships were short-lived in Athens, and it would be over two millenniums before the philosopher king (and student of Plato and Rousseau) Pol Pot was able to finally achieve a lasting society based on Socratic principles."

And so much more...

Tuesday, May 24, 2011

Stupid Government

It turns out that Firefox 4 for linux is not a supported browser, and that I cannot continue to even attempt a FAFSA application without either windows or mac os and an approved browser (Firefox 4 on either of those works fine).

Good old User Agent Switcher to the rescue. Don't tell uncle sam that I don't really have IE7 on Windows, and I won't break the internet.

Ubuntu

Every six months when a new ubuntu release comes out, I timidly install it first on one machine, then another, and am amazed at the changes. Sometimes, it's good. Sometimes it's bad. For example, I recently discovered that support for my CanoScan 200 has been incorporated into xsane (this wasn't the case a year ago). That's a good change.

The unity desktop is easily enough discarded by logging out and choosing classic. The sticking downsides would be that the console fonts or screen resolution changed without my doing anything, and are now painfully small and wrongly aligned. It also seems like my maximum X resolution given the same card, driver, and monitor have been inconsistent from release to release.

But I scanned an image, it works, and I'm happy:

Friday, May 20, 2011

The future

So, I am at an impasse... a year ago I had very set plans to sit for two years of college, complete a degree, and find work in the insurance or consulting industries as an actuary. The longer I have to think about it, the less likely I think this will be the best fit for me.

Firstly, I fail to find statistics fascinating... I imagine many people aren't as excited about it as the newspapers might make you believe. Some of it is very straightforward (probability), some of it is more technical than many people can intuitively grasp (statistics, estimators, convergence, significance tests, obscure distribution functions). Secondly, I don't think a desk job with low stress and clean fingernails is really in my nature. I prefer to stand an walk and talk too much.

I started wondering about atmospheric modelling as an application for numerical computing (lots of data, lots of pde's, a little physics and chemistry, and a wealth of feedback from the real world). I have always been intrigued by high-frequency trading software and options pricing/arbitrage.

I worry about graduate school, largely because it seems like a large commitment, and I am overall a fairly unambitious and laissez-passe type. Alternately, I'm concerned that the short two years I have at UIC will be insufficient groundwork for access to better programs (UChicago and Northwestern are shining stars in nerdland). I anticipate taking the GRE this August, and applying to applied math programs at Northwestern, UChicago, and UIC. I expect I can at least be accepted to UIC, and will have met the required courses in the applied mathematics track (ODE/PDE/Complex Analysis) and may be able to talk my way out of retaking them. It's one of the first times in my life when I have looked about me for opportunities and been unable to relocate freely to pursue them. Thankfully, being beached in Chicago is a wonderful curse.

At times I worry that I lack sufficient focus to gain admission into a great program. My current pursuit of math, statistics, and computer science nearly evenly reflects what I hope to learn, and what I hope to find a place to apply in life. Information is everywhere. Statistics is a great way to extract and abstract it, and to test the importance of hypotheses with real data. Computer Programming is an obvious requirement for applying these statistical methods to real data, and a decent amount of exposure to theory will prevent sloppy mistakes. Mathematics underpins it all. But in following this balanced path, I may be missing on the niceties of deeper pure math. I don't intend to take Topology this year, and will sit through a single abstract algebra course, missing out on mathematical logic, and perhaps it will be possible to take graph theory in spring. At the end of two years, I may be merely a very clever calculator. Wouldn't that be disappointing?

vacation

Well, my short 4 week summer break is in full swing. All except the summer. I went to UW Madison last weekend to attend my brother-in-law's graduation (PhD). We had a barbecue at a state park. It was cold, windy, and wet most of the time. I have the unfortunate habit of dressing for whatever weather there was yesterday, and this is a terrible idea when packing for a few day outing.

I finished up finals the first week in May. I will be starting two classes in June/July to get some nuisances out of the way.

I am continuing to work on Knowledge Representation, investigating Cyc. It's a bear of a system, gobbles up RAM like there's a bonbon at the bottom of the heap, and tends to be a little persnickity. Anyone recall 3rd grade computer lessons where before letting you get your hands on a Logo system, they told stories about the stupidity of robots... something along the lines of:
"If you have a bucket on the table, and want it filled with water, you can tell a man to take the bucket to the well and fill it. If you want a machine to do this, you have to tell it to move forward 10 feet (to the table), reach for the item at 3-1/2 feet, grasp, lift, turn (whatever direction the well is) advance so many feet, stop, lower bucket into well (at this point the robot has probably fallen in with the bucket since we left off telling it about the rope and crank)..."

I am struggling to get this enormous warehouse of mundane facts to produce sensible answers. What's a thing like both a knife and a spoon? Of course a snowmobile also has a handle and is a man-made tool, that's just the right answer. This was a productive answer... Every time I try to whittle it down closer, I reach less and less satisfactory answers. Did you know that the greatest common denominator of dashboard and spoon is 1, and that they are thus relatively prime numbers? I didn't, and I sometimes worry about the leaps of ingenuity that allow this program to steam-roll through common sense.

I think Cyc is a great way to represent knowledge, and for some simple questions it is fitting, but for many of the things an eight year old would think you were stupid to have asked it flounders. It is, of course, just as likely that I don't have the nuanced feel for the thousands of available predicates to ask just the right question to lead it to the best answer (Fork would win a gold medal).

Friday, February 04, 2011

vocation

I just accepted a position as a research aide in the computer science department at UIC. Looks like it should be interesting, and hopefully developmental. I guess getting a paycheck is a good thing, too. Not sure how much or what exactly it will entail, I have some hints, but we'll see. I also don't know how large of a team is working on this problem.

Wednesday, February 02, 2011

Glenwood disaster area


This is the side street by our home. Mostly little antennas sticking out of snow banks. Reminds me of a Norwegian commercial where a guy spends all morning digging his car out of the snow, hits his key fob to open it, and the car in front unlocks.

Snow removal



This is our task force at work! My having the camera makes it look like I didn't do any of the work, but I assure you it was quite the opposite.