Archive for the ‘Geek stuff’ Category

Fnord!

Friday, March 12th, 2010

Via Lifehacker:

qrcode

That, my friends, is a ‘QR code‘ generated by this site. All this one encodes is the URL ‘fnord.phfactor.net’. You can also make one with text, phone number or SMS (text message.)

On the iPhone, I’m using the QuickMark app to decode ‘em, which seems to work pretty well and also does old-school barcodes.

Pointless? Check this usage out, and be sure and watch the linked video.

There are some other uses as well. You’ve got roughly 7KB of data, depending on encoding and error correction. Amazing times we live in, eh?

Apple and attention to detail

Wednesday, February 3rd, 2010

A lot of people criticize Apple for its prices, but I have to say in response that taking the time to polish all the edges and simplify really helps. Consider this: I have had a few Bluetooth mice over the years, from Microsoft, Logitech and Apple. The latest Apple mouse is the only one where today it warned me that the batteries are low:

Screen shot 2010-02-03 at 12.03.01 PM

It’s a little thing, but for once I know to go get batteries, before the mouse just stops working.

It’s a nice mouse even without that feature, but taking a little bit of time to add software and hardware for voltage monitoring, it’s just easier to have and use.

In really high-end watches, the inner bits are polished and finished by hand to astounding degrees, even the parts that will only ever be seen by a watchmaker doing the service. Perfection is it’s own reward sometimes.

A nice interview on STL, coding and algorithms

Friday, December 25th, 2009

Alexander Stepanov is the main driver behind the OMFG-that’s-amazing Standard Template Library for C++. I rather agree with him on object oriented programming (OOP):

I find OOP technically unsound. It attempts to decompose the world in terms of interfaces that vary on a single type. To deal with the real problems you need multisorted algebras – families of interfaces that span multiple types. I find OOP philosophically unsound. It claims that everything is an object. Even if it is true it is not very interesting – saying that everything is an object is saying nothing at all. I find OOP methodologically wrong. It starts with classes. It is as if mathematicians would start with axioms. You do not start with axioms – you start with proofs. Only when you have found a bunch of related proofs, can you come up with axioms. You end with axioms. The same thing is true in programming: you have to start with interesting algorithms. Only when you understand them well, can you come up with an interface that will let them work.

The rest of the interview is quite good as well.

New ssh attack is out there

Tuesday, December 8th, 2009

I woke this morning to a slew (here defined as ‘62′) of ssh dictionary attacks:
Screen shot 2009-12-08 at 6.40.40 AM

There were already 20 or so last night. Looks like a new botnet/attack wave or similar. I’m using DenyHosts and quite frankly, you should be too.

If you’re running Debian, there’s a nice package for it that I use and recommend. I’ve set mine to trigger on 3 attempts, but I’ve few users and most use ssh keys and not keyboard auth.

Might be a good time to run chkrootkit and change some passwords!

Light emitting diode fail

Tuesday, December 1st, 2009

A couple of weeks ago, the car lost its second taillight. Same one, in fact, driver’s side brakelight. This time, after replacing the bulb (standard 12VDC 1157 dual-filament) I did some research into LED replacements. After all, LEDs are longer-lived, can be as bright or brighter, and turn on faster for a teensy bit more reaction time for people behind you.

After a bit of Amazon research, I found the Vision X HIL-1157R:

IMG_0097

It’s a drop-in replacement, same shape, should fit most vehicles. However, our car (2005 Allroad) doesn’t like it. Audi, in their finite wisdom, chose to have additional circuitry to check for blown lights, and beeps incessantly if it finds one missing. The LED bulbs don’t satisfy the test circuit, so hellish beeping is the fate of anyone who tries this.

So I’m out $20 and have a spare pair. Email me, I suspect they’d work in cars without the check circuit.

New laptop notes

Wednesday, November 11th, 2009

So I got a new laptop at work, and based on some good data I wrangled the solid state drive instead of a conventional hard drive. I had to go on a file jihad to make space (down to 250GB, ug) but the results are astounding:

Writing a 10G file

Writing a 10G file

Y’know, for a laptop that’s nothing short of astonishing! Easily 3x the old drive. The read is even faster:

Screen shot 2009-11-11 at 7.45.32 PM

Note the 122.49MB/sec and almost zero CPU while doing so!

Wow. This is easily the most noticeable speedup since the days of the Celeron 300A. The 256GB drives are currently a $585 premium on the Apple store, and even at that I cannot recommend them strongly enough. Programs and data just snap now, even sluggish stuff like the Komodo IDE, ipython, Firefox and Photoshop.

Don’t wait for your next laptop, just buy an SSD for your current one and enjoy the ride.

Best freebie yet

Sunday, September 27th, 2009

I’ve been working my way through a box of Luminox watches for WatchReport, and have also been enjoying what is probably the single coolest freebie I’ve gotten to date. It’s a Luminox-branded flashlight:

Looks like your basic Chinese LED flashlight, right?

Looks like your basic Chinese LED flashlight, right?

But this one does tricks. First press lights up the white LEDs around the outside:

Basic white .5W LEDs

Basic white .5W LEDs

OK, that’s nice, but see what happens on the next press:

You get an inner ring of 5 purplish LEDs

You get an inner ring of 5 purplish LEDs

It took me a while to figure this out; at first I thought it was just a slightly different color set. More efficient? Gimmick?

Then came the a-ha moment: It’s ultraviolet light! Perfect for seeing what dies flouresce, checking out the security printing on your license, and charging the lume on watches.

And it has yet One More Trick, too:

Yes, it's a red LED laser to boot.

Yes, it's a red LED laser to boot.

A nice, bright laser light. Good for hundreds of meters at night. How’s that for an awesome flashlight?

Fnord through the years, a nerd saga

Monday, September 21st, 2009

I was taking a few pictures of the new server, and hit on the idea of trolling the photo library for a nerd photo essay on “phfactor: this is your life!”

Here’s circa 1998, Albuquerue: SparcStations dominate, with an LX for circuit design and running Office (DX2 486 PC on an Sbus card, quite cool for the time.) Fileserver and DNS on a sparc2 (using a DecStation box for the full-height hard drives!), sparcprinters and HPLJ3p, via Ghostscript. If you look closely, you’ll see a couple of SGI IRIX boxes, a 486 running FreeBSD 2.2.6 (dialup/NAT bridge), oscilloscopes, 10-base2/T hubs and other such arcana. The shelf with the monitors on the left is double-layer, as it sagged under the 100lb+ weight of the monster CRTs of the day. Man, I don’t miss those at all. Three seven-foot racks, custom made by my wonderful father-in-law-to-be:
mvc-072f

Then there was my actual desk:

mvc-043f

(Full album of pictures is here, FYI.)

Dual-Pentium-MMX, baby! One of my better projects underneath the monitor – car stereo amplifier/EQ, in a HP GBIB floppy enclosure I repurposed to house it and provide 12VDC. Still works! Clicky M-series keyboard and my ‘behind the 8-ball’ Kensington trackball. Looking close, I see my old 6-CD changer, whose primary use in life was running Riven without changing CDs for Chris. ;)

In Dec of 99, we moved to Dekalb, IL and I rebuilt the racks using smaller hardware, sold and gave away a few thousand pounds of obsolete stuff and restocked the racks for our shiny new DSL connection. Now running a Debian-based firewall on a Pentium 90:

dekalb-2

The gap on the left is the just-sold Sparc 10. Good box, beautifully made and built. I also swapped my SGI Indigo2 for a Garmin Etrex GPS for flying. Good trade, that. Somewhere in here, phfactor started being a server and hosting a website. OpenBSD on Sparc is still one of my favorite platforms, super slim and damned near impossible to hack. I’m pretty sure the sparc LX there in the picture is serving up www.phfactor.net, very early on.

(That laserjet4M+ lasted close to a decade. Best printer from HP ever.)

Dekalb, getting fancier.

The teeny-tiny monitor was surplus from the LANL/SNL auctions; former bank display. 7″ monochrome VGA, and perfect for a server rack in the pre-LCD days.

In the lower right, there’s a 1920s-vintage voltage monitor that I scavenged from a physics trash can. Simple, easy to read, nice way to monitor your wall voltage. I still have it, actually. It shows up in a few pictures on this page.

After a 20-month lease, we bought a house in St Charles, with a big walkout basement, and I got to stacking:

MaxStack 'o' Sparc

MaxStack 'o' Sparc

That’s pure nerd beauty. SparcStations everywhere! Tape backup! DNS, web and mail, split across machines. Slow, loud, hot and hard to manage. Note the high-nerd-value Kalpana, the first ethernet switch if memory serves. Early-stage WiFi, too, D-Link hardware that worked pretty well.

Later, I collapsed to a server running Debian (lower left tower):

Compute Corner

Compute Corner

Still have the laserjet4, though. And mixer. And Geiger counter. FibreChannel off to the left.

Across the room was the electronics bench:

img_1640

Man, I miss having the space for the bench. It also worked great for building machines: (Here, I was shoehorning OSX 10.0/1 onto maxed-out PPCG3. Didn’t work very well.)

img_1963

In 2005, we moved to Lincoln Ave in San Diego, and I gave away a lot more stuff. No more sparc, now trying for quiet gear. Debian moved to a Pentium-D box in an Antec Sonata II case with hardware RAID:

lincoln

Now up to a color laserjet, heavier and not as good. On the plus side, no more heavy and power-hungry CRTs, either.

Now at last we get to the present. pHFactor is now completely run from a nearly-silent machine the size of a Harry Potter hardback:

The old and the new

The old and the new

(Zotac Ion mini-itx, Intel Atom 330 dual-core with 4GB of DDR3 and a 250GB laptop drive, external 90W PS. NV9400M, so 16-core nvidia GPU as a Cuda bonus. $189 for the motherboard, $65 for memory, $35 for the case. See below for links.)

That’s the Antec in the background for scale. The mini-itx hardware is freakin’ tiny:

DSCF1008

Nice heatsink on the CPU, shows why it can run fanless:

DSCF1010

I had initially planned on zero noise via no moving parts – the Zotac has an optional fan, and the case and PS have none. I had to compromise, though. SSDs are still too expensive (I need the 256GB) and in the end I had to use the Zotac chip fan due to the CPU hitting 89C. Thermal shutdown alerts, ahoy!

DSCF1007

That’s with hard drive installed, pre cable cleanup.

And here’s the final shot, sitting very unobtrusively in the living room, dwarfed by the modem from AT&T U-verse:

DSCF1037

If the room is quiet, you can hear the 40mm chip fan; other than that a huge win. The server now has fast ethernet to the modem, which solves all sorts of speed and reliability issues I was having with the previous WDS backbone to the upstairs. Yeesh, was that a lose.

Smaller, faster, cheaper, less noise, almost no heat, 4GB of memory and 4 CPUs when you log in. Damn but the times are amazing, and I’m a lucky nerd indeed. I am really coming to appreciate silence and low power, and now I’m basically down to finding a better mini-itx case that will have decent airflow. I think if I do that I can lose the chip fan.

The Atom is an amazing CPU, and these perform pretty well. See this and this and this for more info on it and the Zotac. It feels a bit slower when logged in, due to the slower laptop hard drive, but that’s a tradeoff I’m happy to make.

Update 9/24 – links to where I got hardware:

From your point of view, phfactor.net should be faster and more reliable. And hey, anyone need a pentium-d system, well-equipped?

Last but not least, check this out. It’s a large box, full of screws, for various computers. All from surplus, none purchased. I was looking at this and wondering how many machines I’d worked on to accumulate it. Dozens, maybe over a hundred? Wow.

DSCF1006

Updated 9/26/09 – added bench pictures, hardware links, more edits and a bit of commentary.

Useful zsh tricks

Friday, June 26th, 2009

I’m using zsh on my mac, mostly for its better completion system. A coworker asked me for a couple of tweaks, the answers took a bit to find so here’s a FYI for the command line nerds out there.

Q1: The cd command tab-completes files, which is totally broken.

Fix:

 compctl -/ cd
Q2: Tab-completion for git commands, please
Ans:

 compctl -k "(add bisect branch checkout co clone commit diff fetch grep init log merge mv pull push rebase reset rm show status tag)" git
The second just says that that ‘these words in the array are the arguments for the git command.’
There’s also the vastly more elaborate code here, which modifies the prompt to show git status when in a git-controlled repository. I’m trying that now.

Q3: Fix the prompt when using virtualenv
Ans: See this post (especially read the comments). Looks like 1.6.1 of virtualenvwrapper and newer should ‘just work.’

Snake!

Tuesday, June 16th, 2009

I was up at SDSC today, and saw this out the window:
cables

SDSC is clearing out the old machine room, and had stacks and stacks and stacks of cabling they’ve removed. Newer hardware generally equals fewer and thinner cables; nice, that.