http://www.highlevelbits.com/rss feed2017-04-30T00:00:00ZFredrik & Hardyhttp://www.highlevelbits.comtag:www.highlevelbits.com,2017-04-30:/2017/04/ten-years-after.htmlTen years after2017-04-30T00:00:00Z2017-04-30T00:00:00Z<p>It is a bit more than ten years since me and Hardy decided to get this blog started. In
the <a href="/2007/02/there-is-hope-despite-everything.html">first post</a> I wrote from my 10 year
perspective in the software development industry. Now 10 more years has gone by and my
experience is so much stronger than it was back then. I still do mostly development and I
still think it is really fun.</p>
<p>This blog has been a one man show for the last 3 years and perhaps a bit longer than that.
I don’t feel som much joy in this anymore so I will do other things with my time than posting
here. Perhaps some random tech notes will end up here but otherwise not so much. I am
playing a bit with <a href="http://froderik.tumblr.com/">tumblr</a> and I still hang around at
<a href="https://twitter.com/froderik/">twitter</a>. I still feel sad about the
corporateness of social interaction these days but I find it hard to do anyhting about it.</p>
<p>So some statistics. The blog has had some 100000 page views over these 10 years. That is pretty cool.
One fifth of those views are from two popular articles that Hardy wrote a long time ago.
<a href="/2008/10/using-macs-textedit-from-command-line.html">Using macs textedit from the command line</a> and
<a href="/2007/04/svn-over-ssh-prompts-for-wrong-username.html">SVN over SSH prompts for wrong user name</a>.
Both these posts have been linked from stackoverflow and that is one big source of traffic. 31% of our
visita have been from the US while our home country Sweden stands for some 8% of visits. We have had visits
from almost all countries in the world with the exception of quite a few in africa and Papua New Guinea. 42 %
were using Windows, 39% on a Mac and 11% on Linux. To get all this statistics we have been using
Google Analytics. Today I would have chosen another solution for tracking and I am sorry if Google
have taken advantage of this tracking in any way. (They probably have….)</p>
<p>So to sum up. Don’t expect much activity here for a while. I may come back to it or may not. Or my
co bloggre may return to the scene. I will probably keep the site up and running until I die. And
if I do anything with it it will be to put it on SSL.</p>
tag:www.highlevelbits.com,2016-09-14:/2016/09/parts-of-line-with-sed.htmlHow to extract part of a line with sed2016-09-14T00:00:00Z2016-09-14T00:00:00Z<p>Say you have a file with lots of data but you really just want to find a couple of lines that matches something and then
you want to extract another part of that line to a list. <code>grep</code> and <code>sed</code> can help you. So for example to match on
<code>the new paris</code> and extract the number 19 from <code>manif_id="19"</code> on the same line you could do:</p>
<pre><code>grep 'the new paris' china_books.xml | sed -n 's/.*manif_if=\"\([0-9]*\).*/\1/p'
</code></pre>
<p>The parentheses - <code>\([0-9]\)</code> - in the regexp part of the sed command captures what is inside and makes it available to the <code>\1</code>
parameter in the second part. Note that parentheses needs to be escaped!</p>
<p>Also about to finish a great book.
<a href="https://www.goodreads.com/book/show/26042254-the-last-days-of-new-paris">The last day of new paris</a> by China Mieville.
All about paris and surrealist manifestations. Recommended!</p>
tag:www.highlevelbits.com,2016-07-07:/2016/07/steam-problem.htmlLibrary problem with steam on arch linux (i965_dri.so)2016-07-07T00:00:00Z2016-07-07T00:00:00Z<p>Using a rolling distribution like Arch is good in many ways but when things you really
need start to break it is not so fun. I have had some problems with steam - a thing
I really need in order to play games! (Yes - priorities are rightly ordered!) Apparently
steam comes with a couple of libraries that sooner or later will become older than the once
installed in the OS. My error looks like this:</p>
<p><code>
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1467926999)
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
</code></p>
<p>After googling for quite a while and trying a couple of things I stumbled upon
<a href="http://wyldeplayground.net/steam-unable-to-load-driver-i965_dri-so-intel-graphics/">this problem solver</a>.
It made sense to me directly. The post is essentially one line:</p>
<pre><code>LD_PRELOAD='/usr/lib32/libstdc++.so.6 /usr/lib32/libgcc_s.so.1 /usr/lib32/libxcb.so.1 /usr/lib32/libgpg-error.so' steam
</code></pre>
<p>LD_PRELOAD is a way to load some objects before others. In this case we tell steam to use these 4 libraries
instead of its own. Problem solved and I can move on to more important things currently as the King of Finland
in the <a href="http://www.crusaderkings.com/">Crusader Kings</a> year 987. I am about to turn this tribe into a merchant republic!</p>
tag:www.highlevelbits.com,2016-06-22:/2016/06/synchronize-tmux-panes.htmlSynchronize tmux panes2016-06-22T00:00:00Z2016-06-22T00:00:00Z<p>So we have clustered servers which is a pain when you want to look at some log files. <a href="https://tmux.github.io/">tmux</a> and
<a href="https://stackoverflow.com/questions/16325449/how-to-send-a-command-to-all-panes-in-tmux">stackoverflow</a>
to the rescue. I set up <a href="https://github.com/tmuxinator/tmuxinator/">tmuxinator</a> to open up panes on all the
servers and then once inside tmux I go:</p>
<pre><code>C-B :
setw synchronize-panes yes
</code></pre>
<p>…and then I can tail and search all the logs at the same time. (This obviously only works when servers are set up
in the same way…).</p>
tag:www.highlevelbits.com,2016-06-17:/2016/06/joyofcoding.htmlJoy of Coding2016-06-17T00:00:00Z2016-06-17T00:00:00Z<p><img src="http://joyofcoding.org/img/blue-logo-with-white-text.svg" alt="" /></p>
<p>Despite <a href="http://lanyrd.com/profile/froderik/past/">attending quite a few conferences</a> the last few years I didn’t write about
any of them since I went to <a href="http://highlevelbits.com/2014/09/decentralize.html">decentralize.js</a> almost two years ago.</p>
<p>But now is a good time to return to this habit since <a href="http://joyofcoding.org/">Joy of Coding</a> was one of those conferences
that stands out from the crowd. This is for several reasons:</p>
<ul>
<li>Firstly the whole theme of the conference is so positive. Talking about joyfulness
in something that you do for a living is really a good thing.</li>
<li>Because of this positive stance it seems like the speaker lineup is better than usual. And this is despite this
conference having several tracks. (I see a strong correlation between the number of tracks and the overall quality of a
conference. The best conferences are single track. Ok - maybe FOSDEM is the exception….)</li>
<li>Lastly I really like that there are opportunities to do some coding. Just listening a full day is too boring for me.</li>
</ul>
<p>So I went to the coding dojo and here I really knew what to expect since I have been to sessions lead by Emily Bache
before. I found a nice guy to pair up with and we had some fun refactoring bad tennis code into something neater.
For me the most interesting thing from these sessions is not the code but the interaction with a stranger over code.
The negotiation over language, IDE and keyboard initially and then the initial stumbling to establish the skill level
involved. Also being expressive about code can be hard at times. To explain why you want it it in a certain way.</p>
<p>On to the talks. Philip Wadler talked enthusiastically and interestingly about category theory and why it is
important for programmers. I have to admit that all this is a bit over my head at the moment (after being a programmer
for some 16 years….) but maybe I will get there eventually. I get sort of all of what he is saying but fail
miserably at making the connections to my everyday work situation. But the may be because my customers never wants me
to code in a so called <strong>real programming language</strong>. He ended the talk by morphing into a lambda super hero.
And that was fun of course!</p>
<p>After the dojo Corey Haines talked about prolog and cats and it was fun and all good. Corey is a talented speaker
that probably could talk about anything and make it interesting. In this case the topic is intersting in itself
and I started to think about how to implement <a href="https://github.com/froderik/roman_numeral_katas">roman numerals</a>
with prolog.</p>
<p>Stefan Tilkov talked about micro services built with clojure. As always when I hear a talk about clojure I want
to get home and learn it. I have the book….. Maybe it happens this time. But it has been 6 years now since I
heard Rich Hickey <a href="http://highlevelbits.com/2009/10/1st-day-of-jaoo.html">talk about it at JAAO</a>.</p>
<p>Hobby Oriented Programming was an interesting talk by Sonja Heinen about the contrast betwen doing things for fun
as a hobby and doing it to pay the bills. I can certainly relate to this. Not every day at my customers site
is joyful. And most of the time when I do something on the side it is really fun and fulfilling. This dilemma is hard
to get by. For me it is realy important to get some leisure time for coding. Otherwise I get mad at the boringness
of <em>coporate coding</em>.</p>
<p>Then a fun talk about GIF - the image format that keeps giving. Igor Wiedler managed to give as a short history lesson
about image formats and browsers, describe the GIF format in technical detail and also be really entertaining in some
40 minutes.</p>
<p>Lastly the ending talk was about data analysis. Hilary Parker suggested that data analysts should become better at
programming. I think this is a great idea. Not everyone is as keen to learn R as I am. Not everyone is keen to learn
at all and by acquiring some coding skills a data analyst can do her job much more efficiently.</p>
<p>All in all a great conference that I may come back to another year. My first encounter with Rotterdam was also
much better than expected. A modern city with a nice vibe.</p>