Popular Posts

Thursday, April 14, 2011

The Decline and Fall of BSD

I had to run a FreeBSD binary the other day, so this meant I had to actually install

From what I can tell of the freenode irc channels, nobody uses /usr/ports anymore. "Just use pkg_add, it will work." completely missing the point here that if I wanted a binary distributed OS I could install ubuntu. Nobody bothers to recompile the kernel. "If stuff works as is then why bother to recompile?" (completely missing the point. The point is that BSD is supposed to be super tuned and lightweight to your system so that you can brag that your 128MB Ram P133 running FreeBSD 3.2 can outperform a dual core machine with 1 gig of ram running Windows 7.

But the modern BSD users don't seem to get that.

However one good thing to note, I am finally glad that BSD users have stopped lying to themselves by insisting OSX == FreeBSD.

Wednesday, April 13, 2011

How to Tie a Merovingian Knot



This is the knot that is seen worn by the Merovingian. Which is why it's now called the Merovingian knot, even though it had two perfectly fine names which were the Ediety and the Atlantic knot.

A bit ridiculous is that if you search for "Merovingian Knot" you will get about a billion videos about how to do it. I of course protested actually using these videos, since why use a sledgehammer when a flyswatter will do? Let me translate that for the newer generation. Wasting energy when you can be efficient is not sustainable. There. Make sense for you now? Anyway, point is here is a simple animated picture that will tell you how to tie a Merv/Ediety/Atlantic knot.

Sunday, April 10, 2011

Public Witness

"That whole public speaking thing is something i'm getting really good at... ...gave a tech presentation a few weeks ago to a pretty hard-core bunch... managed to keep control of that one too. Stamped down the twits who try to derail you quite elegantly and still kept the floor open for discussion. When some wanker tries to derail it I can switch into his vocabulary and shut that nitwit the hell up. The trick for tech presentations is to open with a familiar case and establish the reference words and then stick with that... there's always some bastard who wants to drag you into his domain. You have to keep the audience on your side and you do that by not treating them like idiots. Establish the reference framework early on; when that bastard (there's always one) tries to pull you out ridicule him. Everybody hates that guy anyway."

Tuesday, April 5, 2011

Why doesn't the BART run 24/7?

As far as I can tell, it's to promote DUIs and drunk driving. The BART closes at 12:30. The bars, close at 2. Therefore people will drive drunk.

Don't give me the lies about "oh we have to clean it." There are perfectly fine 24/7 subways in the world, (eg, the US has one, Copenhagen has one, etc) which clean the express/local tracks by rerouting trains to the local/express track.

Face it, native Friscans, the BART system builders decided to half ass design and engineer their system and you got ripped off, and have been making excuses for it all your life. What's obnoxious is that you go around telling people who move here "Oh it is impossible to have a 24/7 subway. Just impossible." To which I laugh and point out the counterexamples. Inevitably, I have to pull a map out and teach where Copenhagen or anywhere out side of Northern Cali is to these people as well.

Why this solution has escaped the self proclaimed "brilliant Frisco engineers" is amazing. They're probably too busy groupthinking and Sanfransocializing up friendster/orkut/facebook clones to actually come up with original thoughts and solutions for issues in the real world.

Another stupid issue with the BART is that it costs you more to go farther. So you are now also encouraging people with longer commutes to drive. Which is completely counterproductive to the concept of public transportation. BART should be FLAT FEE like the other subways so that when you get on, you will want to travel as long as possible on it, and thus be OFF THE ROAD. The way it is set up now, BART travel makes sense for intra-sf trips and one-two hop trips. Which would be fine if they admitted this, but BART tells everyone that it is a "commuter rail to ferry people from the east bay into SF." Yeah. BS. Your economic model says otherwise, and when in doubt, always follow the money.

The way it is set up now, BART is optimized for the dilettante bourgeoisie flitting from fake cultural cafe to fake cultural art studio, or the hooker that is too fat to walk, not the average commuter.

Face it. The BART, like the GG Bridge, is just a toy model for tourists to look at. Tho, they really should clean the seats on the BART. The homeless people use them as urinals.

Sunday, April 3, 2011

The Non Pretensious Map of Frisco

You hear it all the time, people trying to engage in renters-bragging about what section of Frisco they live in, using phrases like "The Marina" or "Cow Hollow" or SOMAPOTMISS or Mission Bay, or Dogpatch --as if every block required it's own Nomme-De-Absurdism. They seem to be making these names up every other week (as in the case of SOMAPOTMISS) in order to justify paying some ludicrous rent increase or in order to maintain some semblance of street cred or "sense of neighborhood" (as if anyone in Frisco has such a thing).

Hang it all. I am just going to refer to the stupid areas with the original District Zoning Notation.



So conversations will go:
"Oh you know, I live by Hayes Valley..."
"Oh you mean District Six."

How about:
"I live in Buena Vista but always go to the Mission for drinks, and sometimes the Castro to catch a flick!"
"Oh, so you mean you never leave District Five. Kinda lame, man."
(The entire width of Frisco from bay to breakers is 8 miles wide. This guys world fits in about 6 sq miles.)

And by the way, if you are thinking that SOMAPOTMISS smells like how it sounds, you'd be right.

- District 9 resident.

Saturday, April 2, 2011

More Fake Liberal BS

This crap is what you'd hear from the fake independent radio station coming out of The Mission.

The problem with this crap is twofold.
First off, the simplistic, knee jerk reaction of this piece shows that the songwriter clearly doesn't understand the complexities of foreign policy, and is still trying to merely use some twisted combination of white guilt and pathos in order to sell his message.

Secondly, I am again amazed how people who claim to have issues with "Drill Baby Drill" and other such jingoistic chants, are incapable of seeing that this crap is just like it, only with the Desktop Theme changed. It's the same idiotic uninformed crap that extremist pundits on both sides get very rich on preaching to the idiot zombies.

Tuesday, March 29, 2011

State of the Open Source Movement

The open-source scene pretty much took the fun out of programming. It's become an industry of egomaniacs engaged in constant one-upsmanship. There is little-to-no collaboration, constant reinvention of the wheel, and little done of actual technical merit -- most work tends to be the manipulation of known and well-documented APIs, or the debugging of someone else's code. All in all, it has become distasteful.

There is a lot of grief for little, if any, reward. Open source users -- not to mention developers -- are more impatient, demanding, rude, and insulting than their counterparts in the commercial world. Why put up with this when people will pay you for your time and effort, and actually thank you for taking the time to read a bug report?

You know, I was reading the Van Roy paper and took a nap. I had this dream where I encountered this really nasty bug in something I released, so I stayed up late figuring out how to fix it, uploaded a new version, then posted a news item telling users not to use the previous version, and what the (now fixed and closed) bug was. This post got a few comments saying stuff like good catch, validated that the new version does indeed fix the bug, etc.

Now I woke up a bit later and thought all over this and realized that this is completely the opposite of how open source projects work. Commercial software works this way, but not open source stuff. The lesson here is that you don't want IT people as your userbase; they're bastards; even though they should be more understanding than any other people that software takes time, bugs happen, and some problems aren't solvable.

I think it goes back to the social problem of many IT people- every coder thinks they are better than other coders, even when their stuff sucks. Coders look down on sysadmins (who are often their users), and sysadmins in turn think that coders don't know their jobs as well have the deluded belief that writing a large multithreaded highly complex piece of software is as easy as using a scripting language to read text logs.

So yeah, to be happy, write software for closed source.

You know, since that stupid bazaar vs cathedral essay came out, I always got the impression that the cathedral was a nice, serene place of thought and meditation, and that the bazaar was a place one would get stabbed during a shouting match over haggling about some feature/bugfix.

Sunday, March 27, 2011

Twitter



Researchers found that a small minority of users-- around 0.05% of the site's population-- are generating half of all Twitter posts.

I can see the plausibility of using something like facebook for networking, for some lines of work [sales etc]... but twitter has no observable utility, all those feeds would be better served by an RSS feed.

I don't want to be notified, say, when the beer changes at Toronado, I want to know what is on tap tonight.

Sending from SMS means that any message is not going to be well-thought-out and will likely be vague or incomplete, and receiving via SMS means constantly getting interrupted by ill-conceived messages. It just sounds like lose-lose to me; the nature of Twitter guarantees that the posts are going to be inane drivel. With RSS there was a chance you'd get useful info (though Google news turned out to be a better way of getting headlines). With Twitter feeds, there seems to be no chance of getting useful info; it's the nature of the medium.

I'm not saying RSS is great or that I rely on it; but I fail to see how Twitter is in any way an improvement (for the consumer of the feeds i mean... obviously sending via SMS is convenient for the publisher). They are useless for the consumer; for the producer, sure, but who cares if it is convenient for the producer? They are the ones making money off the thing!

Thursday, March 24, 2011

the rest

markup langs:

SQL
http://www.w3schools.com/sql/default.asp

XML

go do the xml thing first
1. http://www.w3schools.com/xhtml/xhtml_intro.asp
2. http://www.w3schools.com/xsl/xsl_languages.asp
3. http://www.w3schools.com/xpath/default.asp
4. http://www.w3schools.com/xslfo/default.asp

5. sgml
-------------------------------

others:
go:
-http://golang.org/doc/go_tutorial.html
-http://blog.golang.org/2010/07/gos-declaration-syntax.html
-http://golang.org/doc/go_tutorial.html


scala:
http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-1
http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-2
http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-3
http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-4
http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-5


So far the documentation is anoying; every time I read a document it has jargon that is either java PL buzzwords or scala specific.

The most important things in scala seem to be:
pattern matching
first class functions
case classes
- http://www.scala-lang.org/node/107
- http://webcache.googleusercontent.com/search?q=cache:45KFeYN40gEJ:www.codecommit.com/blog/scala/case-classes-are-cool+what+are+case+classes&hl=en&client=firefox-a&gl=us&strip=1

new operator syntax for embedded dsls
type inference
implicits
- http://patricklogan.blogspot.com/2007/06/scala-implicits.html
structural (duck) typing
import syntax
collections
actors
- http://www.scala-lang.org/node/242
traits
- http://www.scala-lang.org/node/126
problems with scala:
http://warpedjavaguy.wordpress.com/2010/08/02/the-scala-is-too-complex-conspiracy-1/
http://michid.wordpress.com/2010/08/24/so-scala-is-too-complex/
http://www.infoq.com/news/2009/07/scala-replace-java
http://blog.ericdaugherty.com/2010/07/is-scala-too-complex.html
http://jaxenter.com/is-scala-too-complex-30645.html


weird:
http://www.hermetic.ch/pca/algorithms.htm

dumbing down the programmer:
http://en.wikipedia.org/wiki/Component-based_software_engineering

Ruby

Ruby:
http://yonkeltron.com/2010/05/13/creating-a-ruby-dsl/
DSL. DSL. DSL! http://en.wikipedia.org/wiki/Domain-specific_language
Think in terms of DSLS and blocks. Everything in terms of blocks and defining
a langugage to fit the problem!
metaprogramming
http://viewsourcecode.org/why/hacking/seeingMetaclassesClearly.html
http://mislav.uniqpath.com/poignant-guide/book/chapter-2.html
http://www.contextualdevelopment.com/articles/2008/ruby-singleton
http://ruby-metaprogramming.rubylearning.com/
dsl:
http://www.rubyinside.com/how-to-build-a-dsl-domain-specific-language-in-ruby-356.html
http://yonkeltron.com/2010/05/13/creating-a-ruby-dsl/
http://themomorohoax.com/2009/02/25/how-to-write-a-clean-ruby-dsl-rails
http://www.themomorohoax.com/2009/02/25/how-to-write-a-clean-ruby-dsl-part-2-line-by-line-with-machinist-rails
http://jroller.com/rolsen/entry/building_a_dsl_in_ruby
http://jroller.com/rolsen/entry/building_a_dsl_in_ruby1
http://jroller.com/obie/entry/the_magic_of_ruby_dsl

http://www.infoq.com/news/2007/06/dsl-or-not

Tuesday, March 22, 2011

C/C++

All languages use libraries, so that isn’t really quite a distinguishing feature. However you should probably pay attention to the *quality* of libraries available.
Java and Python have the best general libraries, hands down. C++ is good with QT.

http://olvemaudal.wordpress.com/2008/11/27/c-idioms-by-example/
http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms
http://www2.research.att.com/~bs/bs_faq2.html (bjarne’s style/idioms faq)
http://stackoverflow.com/questions/1759613/what-c-idioms-should-c-programmers-use

- qt smart ptrs:
http://stackoverflow.com/questions/2884202/qt-and-auto-ptr
http://labs.qt.nokia.com/2009/08/25/count-with-me-how-many-smart-pointer-classes-does-qt-have/

PIMPL (pointer to implementation idiom)
http://en.wikipedia.org/wiki/Opaque_pointer
http://www.c2.com/cgi/wiki?PimplIdiom
http://www.gotw.ca/gotw/028.htm (fast pimpl)

RAII
http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

Patterns:
http://en.wikibooks.org/wiki/C++_Programming/Code/Design_Patterns
http://en.wikipedia.org/wiki/Singleton_pattern
http://en.wikipedia.org/wiki/Observer_pattern
http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
http://en.wikipedia.org/wiki/Decorator_pattern
http://en.wikipedia.org/wiki/Delegation_pattern
http://en.wikipedia.org/wiki/Factory_method_pattern
http://en.wikipedia.org/wiki/Reactor_pattern

COM:
http://msdn.microsoft.com/en-us/library/ms680573%28v=vs.85%29.aspx
http://en.wikipedia.org/wiki/Component_Object_Model

Look at the syllabi:
Basic
  1. Introduction to the STL
    • purpose and structure of the STL: containers, algorithms, and iterators
    • review: class and function templates
    • container classification, characteristics, and content
    • iterator classification and behavior
    • generic algorithms and iterators
    • design of generic algorithms and performance guarantees
    • iostream iterators
  2. Generic Algorithms
    • review: generic algorithms and helper templates
    • interaction between algorithms and iterators
    • generic algorithm goals, documentation, and design
    • sequences, subsequences, and sequence errors
    • descriptions of STL algorithms
  3. Containers
    • properties, insertion and deletion effects, specific functionality
    • vectors
    • lists
    • maps
    • containers and exceptions
    • choosing an appropriate container
    • container adapters
  4. Function Objects
    • functions and generic algorithms
    • function objects and generic algorithms
    • algorithm families
    • function objects and containers, strict weak ordering
    • standard function objects
Advanced:
  1. Adapters
    • function object adapters
    • binders and negaters
    • helper tempates and template argument deduction
    • pointer to function adapters
    • composing new function objects
    • designing function object adapters
    • container adapters
    • priority_queues and heaps
  2. Iterator Design
    • the iterator base class and iterator traits
    • review: class template specialization and partial specialization
    • iterators and const_iterators
    • accessing iterator information in generic algorithms
    • versioning of generic algorithms based on iterator class
    • reverse iterators and iterator adapters
    • insert iterators, adapters, and helpers
    • raw storage iterators, adapters, and helpers
    • designing new iterators
  3. Container Design
    • containers vs. STL containers
    • STL container requirements
    • design of a simple STL container
    • design of a more complex STL container
    • containers, iterators, and const_iterators
    • basic STL components
  4. Allocator Design
    • containers and memory management
    • allocators and the standard allocator
    • allocator portability problems
    • container use of allocators
    • design of a special-purpose allocator
    • allocator hacking techniques
"i'm used to writing async code already and this is all neatly tied to the posix layer, which makes non-blocking network stuff ridiculously easy. there's also the package system (npm), async test suites, no worries about messing up the global namespace, etc. you gotta OOP tho if you just throw literals around you can't have or protect a local scope"

Javascript (node.js) http://nodejs.org/ review:

http://www.w3schools.com/js/js_howto.asp
http://www.w3schools.com/xml/xml_whatis.asp
http://www.w3schools.com/dom/dom_intro.asp

NODE
  • downside, requires libssl-dev (fixed with -no-ssl)
  • install with “git clone https://github.com/joyent/node” (ryan is now joyent)

Use Prototype Programming, Delegation.
prototype based programming -http://coweb.cc.gatech.edu/cs2340/4288
// Example of true prototypal inheritance style in JavaScript.
// "ex nihilo" object creation employing the literal object notation {}.
var foo = {one: 1, two: 2};
// Another "ex nihilo" object.
var bar = {three: 3};
// Gecko and Webkit JavaScript engines can directly
// manipulate the internal prototype link.
// For the sake of simplicity, let's just pretend
// that the following line works regardless of the
// engine used:
bar.__proto__ = foo; // foo is now the parent of bar.
// If we try to access foo's properties from bar
// from now on, we'll succeed.
bar.one // Resolves to 1.
// The child object's properties are also accessible.
bar.three // Resolves to 3.
Don’t bother with Normal OOP. tho you can :
  • http://msdn.microsoft.com/en-us/magazine/cc163419.aspx
  • http://en.wikipedia.org/wiki/Prototype_based_programming
  • delegation http://en.wikipedia.org/wiki/Delegation_%28programming%29
Docs:
  • http://www.w3schools.com/JS/js_intro.asp (javascript)
  • http://nodejs.org/docs/v0.4.1/api/all.html#__filename (node api)
operator overloading (not supported, this spec is fake)
http://www.mozilla.org/js/language/js20-2000-07/libraries/operator-overloading.html

https://developer.mozilla.org/en/Introduction_to_Object-Oriented_JavaScript
node examples:
http://blog.osbutler.com/categories/node-by-example/?page=3
https://github.com/nodejitsu/nexpect/blob/master/demo.js (uses spawned procs)

“DOn’t bother with OOP, just learn the DOM”
http://en.wikipedia.org/wiki/Document_Object_Model

look at the GOOG custom search API, it’s in JSON:
http://code.google.com/apis/customsearch/v1/overview.html
http://www.w3schools.com/ajax/default.asp

Monday, March 21, 2011

Programming Languages as of March 2011

Tiobe's chart which force me to take stock of my favorite programming languages. Erlang is #39. It's pretty obvious it's nothing more than a POC language to take ideas from. Scala is even worse, down at #44. Go is at #14 and falling, and pretty much a one trick pony (Go routines).

Sunday, March 20, 2011

Mathematics

The “ESR 3”

additional:

Strain’s Map:

Thursday, March 10, 2011

Header

http://farm1.static.flickr.com/113/263512030_5d2e69d657_z.jpg?zz=1

ふい (coming to nothing, ending without result, total waste)

Saturday, March 5, 2011

How to Avoid Stupid Startup Recruiters

"So. What do you do?"

This is a question i hear more and more in the dot com cafe section of District Five - the cafe where all the hipsters fight over power plugs so that they can run their latest "XML and Java to put Stupid Stuff on the Web"(tm) startup from when the cafe opens at 6am to when it closes at midnight.

It is a question that makes my skin crawl.

I usually reply, "I am a programmer." If they still look happy to hear that, I continue with, "A programmer is a professional coder, which just means that you have grown the hell up and you have a freaking job and and you don't care about stupid stuff on the web cos you're making money and are acting as an ADULT.

When they try to tell me about all the wonderful web 2.0 bullcrap, I point out that I program things for medical barcode readers, and other medical software. "The stuff that keeps people alive."

Most piss off about then.

If they bother me more, I tell them that when I'm not at work, I try to stop talking about work.

Wednesday, March 2, 2011

Why I don't Use Facebook

People keep asking me when I will use Facebook.

Here's the long version of why I do not. Every time we choose to use a product we are choosing to support a design decision. Actually several design decisions, as engineers out there will know, since every project is a conglomeration of tradeoffs. The one major thing I cannot support in good conscience, is PHP.

Let me just give you a few quotes from the man who designed, maintains, and gave us PHP:

There are people who actually like programming. I don't understand why they like programming. -Rasmus Lerdorf

So as you can see, clearly, programmer happiness isn't something that Mr. Lerdorf cares about. So you can expect that since this isn't a priority, that coding in his language will be full of Pain and Suffering.

I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way

I know how to stop it, Mr. Lerdorf. And it is called the Free Market. If everyone stops using a product written in PHP, then there will be no more engineers demanded who write PHP. Then there will be no more PHP.

And so that is why I will not use Facebook.

Monday, February 28, 2011

Molly Millions

Lets just clear this up:

"Molly is based on the way Chrissie Hynde looked on the first Pretenders Album." -- William Gibson, Cody's Books, Berkeley 1999.

Saturday, January 15, 2011

Dirk Gently's Hollistic Detective Agency

Because, quite honestly the BBC TV show isn't even close. I know now what people mean when they look at say, Lem's Solaris and say "why did Clooney's Solaris remove all the thinking parts?" The BBC tv show has turned Adam's book into some bizarre Doctor Who-meets-Coupling. Quite stupid, and even worse, bereft of any sort of philosophical meaning. They couldn't even costume the lead character correctly.

So if you must have a modern adaptation of Dirk, and weren't able to go to the play, then try the radio show.



Thankfully, I have the audiobook, read by the author himself.