Alcaic Research and technology, not iambic verse.

11Jan/160

Here we go (again)

NOKIA_LOGO_BLUE

New email address. New structure. New world ! And we own it!

NOKIA_LOGO_BLUE

Filed under: Uncategorized No Comments
4Dec/130

Get Lucky

In "Don't start a company, kid", Aaron Hillegass makes 2 great points, which resonated enough that I'd like to modulate them. But let me first hand them to you:

  1. The role of luck in success or failure is underestimated.
  2. The best part of creating a company is defining a culture.
And he is right, I believe. But my experience tells me that:
  1. The amount of lucky breaks around is underestimated. And success is actually the product of luck and the ability to catch one or more of those breaks and run with them. Success = Luck*RunningWithIt. 
  2. The best part of working at a company is being able to change the culture. And while nothing beats defining one, don't accept the status quo. You wanna rock? Create your own mountain range. Ask any teacher for that matter, about creating his or her classroom culture and the impact it has; ask anybody to reminisce about their favorite teacher, chances are that the atmosphere the teacher created had a lot to do with it.
And if you want to really be successful, create a culture of running with lucky breaks, however large or small they may be. At the end of the day, the odds shall be forever in your favor (popular culture linkbait time :-).  

8Jan/130

Career-defining move ?

Filed under: Uncategorized No Comments
28Mar/120

Death of a friend – and resurrection.

Context

About a year back, after a system update, our 2006 iMac (ATI Radeon X1600 GPU) started acting flaky. Strange visual artifacts popped up sometimes, and the machine hanged (hung?) unexpectedly. This post shows what you can do to solve this problem - partially - and I am putting it up because it took me several days to hunt through old message board posts to find it.

Origin

The root cause of the problem appears to be (shame on you, Apple) some quality problems on a certain batch of GPUs from ATI and their mounting. With the ever increasing reliance of OS X on the GPU (Quartz Extreme etc...), the component starts to heat up and some of the electrical contacts fail. That is was temperature related was very apparent last summer.

Solutions

Browsing the web (I am not going to give you a long list of links, since most of this info was buried deep), the solutions fell into 6 categories

  1. Get Apple to replace the GPU subassembly. In my case: too late (even with extended warranty).
  2. Open up your iMac and clean it out, improving the airflow and (hopefully) reducing the temperature. Well, this was needed, and helped for about 3 days. Probably, opening it and cleaning it out just changed some mechanical strain that relaxed later on and the problem resurfaced.
  3. Reflow the soldering by using a hairdryer. Did not try this - the evidence seemed inconclusive and since I did not have a backup machine (I do have a backup of the data) to serve up the files in the house, I did not want to risk frying the GPU completely.
  4. Applying extra thermal paste. Didn't try this either.
  5. Using smcFan Control or Fan Control to increase the airflow. This is the one that convinced me this is the root cause, because it helped. Most of the time. But the iMac did sound like a vacuum cleaner. Most of the time.
  6. Removing the drivers. You read that right. By removing the GPU drivers, the iMac falls back on using the CPU and basic gfx, and hence the GPU is not used and does not run hot/does not corrupt anything. There is of course a trade-off: some programs that use this to payback video, and games as well, no longer work well/at all.

The last option worked very reliably. And since I only use the machine as a server, it is also the cheapest.

What do I do ?

Assuming you want to try #6, here are the steps:

  1. Reboot in safe mode (hold the shift-key immediately after the startup chime)
  2. Go to /System/Library/Extensions/
  3. Move/delete files that start with atiradeonx1000 and atiradeonx2000
  4. Reboot.

Conclusion

I now have a stable machine again, but I am not happy with Apple. This appears to have been a widespread problem a while back, and a divergence of the quality level I have come to expect from Apple. That it is a 6 year old machine is not an excuse - it still runs the latest OS X smoothly (which always surprises me) - I expect the hardware to live until no longer supported by the latest OS.

13Jan/120

XSL hacking for fun (and mindmapping interop)

The itch to scratch this time is the need to have an efficient mind mapping environment that also allows for clean graphics and a lot of flexibility, as well as be cross-platform and well supported.

What was tried first

I wanted a free, well supported mind mapping program, preferably cross-platform. It should enable quick creation of mind maps (to be shared with others) and editable to add cross links and clean up in an graphical editor afterwards. My program of choice, Omnigraffle, is nice, but it is not cross-platform, nor is it (for me) anywhere need efficient enough to quickly mind map (through keyboard controls). Don't mention the price either.

So, the choice was narrowed down to FreeMind (whose format also seems to be widely supported). The one minus: it did not have the capability to add names to connecting links. Another candidate, Xmind had that capacity, but I did not care much for the interface, nor did it seem as well supported or as future proof. This took care of the mindmapping part.

For the editor, I could live with it not being crossplatform, so the next step was to find a way to get FreeMind (FM) files into Omnigraffle (OG). No dice. Copy-pasting the text did not work, there is no export format supported in FM that OG can import, and going through OmniOutliner also seemed to be a dead end (although this was suggested in some fora).

Try 2

Now, I luckily remembered that OG reads graphviz .dot files. And according to this , there is an XSLT ("whatever that is", was my initial response) that allows for the export. Unfortunately, a download of that file proved empty (Sourceforge error?).

I was really annoyed, so I looked at some examples of XSLT, and decided to craft my own. This is what came up with : transformfreemind2dot - here is the github repo: https://github.com/mu1tiplex/freemind2dot

Commented code

If you do not know XSLT, you should! It is a really powerful way to map one markup (or more specifically, xml markup) into another shape/format. Here is an explanation of how the code works:

We want to output text:

 

And now we're going to search for the first map tag. Once found, we output the start of the .dot file, and go through all the nodes twice: once to create them and once to link them. digraph export {

}

Here we create the labels. We match each node and then create a label name based on its ID attribute (which should be unique). A label is assigned then, based on the TEXT attribute (which is what you inputted into the mind map). This is done recursively, if there are subnodes (the choose statement is probably superfluous, but I wanted to add a blank line). [label=""];  

This is the part that creates the links. We first check with test="parent::node" if we are at least one deep in the map (otherwise, there is no parent node) and then link each node with its parent. Since a FreeMind mindmap has no crosslinks (i.e. each node has only one parent, this works).

-> ;

 

final result

From:

The mindmap in freemind

The mindmap in freemind

To:

Converted to .dot

Converted to .dot (shown using graphviz)

Ending at:

Editable in OmniGraffle

Editable in OmniGraffle

Future work

I'll probably add some additional code to also convert internal links to additional graph edges.

Tagged as: , No Comments
11Jan/121

Things and Merlin

Chaos is my natural state. I live and thrive on constant input and movement. I focus when my environment is dynamic. I get bored when things are quiet. But from an operational, task and project management point of view, this often bites me in the posterior. Technology saves me. Specifically, Things (on my Mac and my iPhone) and Merlin (on my Mac).

The problem

Things and Merlin are great, however, they use two databases and didn't really integrate. That's why I was very happy to find that Merlin's support staff had written some scripts that allowed to move items from one to the other.

The snag: it messed up the dates horribly. Now, I have a rather special setup for my short date format in that I prefer yyyymmdd to dd/mm/yy or whatever else is your favorite. That probably has something to do with it. I had expected the OS to take care of this, but there you go. Additionally, it used the planned start date of an activity as the due date, while I wanted the planned end date.

Diagnosis

Looking inside the script bundle (use Show Package contents), which you can find at

~/Library/Application\ Support/Merlin/SendToMenu/Selection\ to\ Things.app/Contents/Resources/Scripts/main.scpt

I found that the applescript uses the parse quicksilver input function -- and this is the culprit.

-- read activity information
set TheDueDate to planned start date
set TheDueDateString to short date string of TheDueDate

… some code cut …

-- this string contains Things project name
set s to "#" & TheTag & " " & TheTitle & " [" & TheMerlinProj & "] > " & TheDueDateString

-- create the to dos in Things
tell application "Things" to parse quicksilver input s

This is what we need to change.

Solution

Using the applescript editor to open main.scpt, I tried various date manipulation doodas (google for them, you'll see that date formatting in applescript appear to be an arcane form of magic), and then realized that using parse quicksilver input might not be the optimal approach. Some tinkering later, this is the final result:

set TheDueDate to planned end date
set ActualCompletion to actual completion
set TheStartDate to planned start date

-- create other way
tell application "Things"
    set newToDo to make new to do with properties {name:TheTitle, due date:TheDueDate, tag names:TheTag} at end of project TheMerlinProj
    if ActualCompletion is 1.0 then
        set status of newToDo to completed
        end if
    end tell

It sends the todo, sets the due date for to the planned end date and if the task is completed, marks it as such. And this works nicely:

Activities in Merlin

Activities in Merlin

Todos in Things

Todos in Things

Next

Two things remains on my wish list: I'd like to use the schedule functionality to schedule at the planned start date and connect the resources in Merlin with the delegates in Things. To be continued.

Postscriptum

You can find my updated script here.

9Jan/120

The greatest music video of 2011

"Rippled" shows us how little technology means compared to how much creativity can accomplish.

Rippled from Oh Yeah Wow on Vimeo.

9Jan/120

Happy New Year

May everything you imagine in 2012 become real! Happy New Year with Xmas trees and OmNom

9Jan/120

Can 1dB keep you awake ?

Warning: if you're not an engineer, a math nerd, or are not feeling especially geeked out right now, this post will probably lower your faith in mankind.

The setting

The other night, as I was falling asleep, I was thinking about differences in how people approach, calculate and specify quantities. Specifically, I had always been used to thinking about power levels of lasers in milliwatt (mW) - while calculating power budgets for optical links in decibel (dB). Now, for some weird reason, I'd never stumbled across the need to know how much power increase 1dB represented. Sure, I knew that 0dBm = 1 mW, and had it drilled into my head that 3dB is a factor of two in power. But that night, I realized that I didn't know how much 1dB extra power actually meant, as a percentage increase. A blind spot if I there ever was one.

So, what would any sane person do then? There are a number of possibilities:

  1. Reach for your iPhone next to your bed, google for "1dB in percent". Go to sleep.
  2. Get up, find a calculator (or a calculator app, on your iPhone), type 10^0.1. Go to sleep.
  3. Forget about it. Go to sleep.

You can also be stubborn and refuse to go to sleep, or refuse to use technological crutches ("What would Leibnitz do?"). And so you lie awake and try to figure it out using mental arithmetic - how hard can it be? (my wife would definitely agree I was being "mental").

How to approximate 1dB

A few minutes later I realized things aren't always simple when logarithms are involved. But I finally reached an answer that made me sufficiently happy to fall asleep ("What!? You didn't get up and check!?"). This is the approach I took:

  1. 1 dB = 10.log10(ratio)
  2. so, 0.1 = log10(ratio)
  3. and hence, 10^0.1 = ratio
  4. this we can calculate by doing a Taylor expansion of 10^x around 0
  5. 10^x|0 ~= 10^x|0 + d/dx(10^x)|0.dx + O(dx^2) (ok, truncating after the first term for dx =0.1 is a bit of stretch, I realized I was underestimating)
  6. now, what was d/dx(10^x) again ???
  7. ah: d/dx(10^x) = d/dx(e^(x.ln(10)) = e^(x.ln(10).ln(10) = ln(10).10^x

And there I was stuck. How much was ln(10)? I knew that e was approximately 2.7, but somehow that didn't help me immediately. So I tried successive approximations:

  1. y = ln(10) meant that e^y=10
  2. y = 2 was clearly too small, and y = 3 too large
  3. how about 2.5? e^(2.5) = e.e.sqrt(e) = 2.7 * 2.7 * 1.6 (the 1.6 was a lazy approximation, since 16.16=256, and 17.17=289 - it was getting late) and that about 10 (more laziness - it was not clear at that moment that I was overestimating, but I got lucky, since I was underestimating due to the dropping of the higher-order terms)
  4. hence: ln(10)=2.5

And so the Taylor expansion gave me 1+0.1 * 2.5 = 1.25 or about 25% power increase. Zzzzzz.

One night later

You might now be surprised that come Saturday morning, I had forgotten all about my nightly calculus. I woke up, went for fresh rolls and never bothered to check. Of course, you can guess what happened when, after a full day without Taylor expansions, I lay down to sleep...

"@$^#^&%!!!" Was I going to get up? And then it hit me that I had been really stupid. There was a much easier way to figure it out.

  1. 3dB = 1 dB + 1dB + 1dB
  2. so, a factor of 2 = ratio.ratio.ratio, or in other words ratio = cubicroot(2)
  3. 11 x 11 x 11 < 2000 for sure
  4. 12 x 12 x 12 < 2000 as well
  5. 13 x 13 x 13 > 2000, so where between 1.2 and 1.3
  6. can we easily calculate something in between? Yes: 128 x 128 x 128 = 2^21 = 16777216/8 ~ 2100000 (And if you wonder why I would know that 2^24 = 16777216, you're definitely in the wrong place. It's the number of colors of a 24bit display, one byte each for red, green and blue).
  7. And that's 5% over, so we need to remove about 5%/3 = 1%-2% since this is a cubic root which brings us to around 1.25-1.26. So: 26% power increase.

In other words, I now spent two nights going to bed too late because of 1dB. Which makes sense, if you know that this might be the tipping point between the technical feasibility of two approaches. 26% means almost a third more power and hence also more heat dissipation. So there.

Verification

Make no mistake, I now went down to check:

  1. e = 2.71828 - check
  2. ln10 = 2.3 - with 2.5, I clearly overestimated, and got lucky with the higher orders
  3. approach 1: 10^0.1 = 1.258 - check
  4. approach 2: 2^(1/3) = 1.259 - check

P.S. For those of you still with me: the reason this all came up was due to some internal discussions on link budgets for different possibilities of next-generation PONs.

21Dec/110

Best effort, or guaranteed ?

This was inspired by a blog post by Jeff Baumgartner. He asked "but what would you feel better paying for, a best-effort 15Mbit/s service, or a guaranteed 5Mbit/s service?". Which is actually a good question - one to which I'd like the collective mind to give their wisdom about.

This will take exactly 2 clicks, one captcha and one press of the return key. And the idea is not to think too hard about it, but just to answer whatever is your first inclination. And as a bonus, you'll get the aggregated statistics and a measurement of you current downlink speed.

So take it !