There is a follow up class for the course I wrote about recently. Looks like the learning curve is a bit steeper this time, so I hope for a lot of new stuff. It is not to late to join it yet: Principles of Reactive Programming at Coursera.org
This is a bunch of links and snippets that I used to set up a Raspberry Pi for streaming media from my Ubuntu machine to the TV.
Putting XMBC on the Pi:
Check under which IP the Pi is connected:
- OpenELEC: Connect the Pi to your TV and check under System > System Info > Network
- Router: Connect to you your Router’s Management screen and find an “openelec” DHCP client
Setting up an NFS share:
- NFSv4 Quick Start
- Using NFS to provide extra disk to a Raspberry Pi
- Explicitly setting anonuid and anonguid
Mounting the share on the Pi:
I’ve seen my share of programming classes over the years (some of which were really good), but I found a new favorite just a couple months ago. The online learning site Coursera was offering “Functional Programming Principles in Scala” by Martin Odersky. Aside from wanting to take a closer look at Scala for quite a while, it was also pretty interesting for me to try out the online class format.
The lecture material was presented in on average 15 minute long videos. They were either showing progress through a set of slides (the recording is showing Odersky’s hand + pen guiding through the bullet points and adding handwritten notes) or screen casts of programming in the IDE. Both formats were very well recorded, clear sound, no annoyances. Slides and videos were downloadable (pdf and mp4) — great for watching on the phone during my morning commute.
The classes were complemented by a total of seven quite crisp assignments that were submitted to an automatic grader after completion. The assignment packages shipped with a set of unit tests that made it easy to check what was expected and also helped to catch how to write additional tests. You would also get feedback from the tests the grader engine ran and could resubmit up to 4 times with improvements. Again, everything nicely documented and well organized.
Overall my main takeaway is, that the simple option of rewinding a lecture like this is pretty priceless. In traditional classrooms, when you don’t understand something on the first try, you are stuck with following the rest of a lecture and catching up offline somehow. Even worse, part of your attention gets split off and tries to figure out in parallel what you missed, making it more likely that you will run into even more problems. Here you just jump back as often as you need. And even better, if you need to stare at a slide for a few minutes before progressing, you do so without getting on anyone’s nerves.
This was my first try with an online class — I hope that I did not just happen to find the best one out there on the first try… 😉
If you fetch Tomcat from the Ubuntu repositories it will automatically start when you boot the system. Once that gets annoying you can get rid of it with one of theses commands I always forget:
More details over here.
I came across a nice little free tool for building quick GUI Mockups: Pencil. It certainly has anything you might need for getting a flat prototype done—which is what I am using it for—but you can also go crazy and link multiple pages, export to multiple HTML pages, etc.
The only feature I am missing so far is selecting all elements in an area with the mouse, but overall things work out better for me with Pencil than with Viso or alike.
Working more with our setup we started encountering “502 – Bad Gateways” errors when allowing users to run expensive queries on our database and give them the option to export the results. A temporary solution was to increase the ARR timeout as described in this blog post; the server farm settings are relevant for this case.
However, this still leaves us with the problem of some browser timing out on lengthy requests, so that we are now looking into an AJAX solution for decoupling the JBoss transaction from the front-end.
When venturing out into Windows Land, I mostly use Cygwin as command line interface. Unfortunately the Win7 64 bit version has the habit of throwing rather cryptic errors from time to time:
0 [main] perl 5248 C:\cygwin\bin\perl.exe: *** fatal error
– cygheap base mismatch detected – 0x61242860/0xD72860.
This, and what appears to be its slight variations, can usually be resolved by:
- Closing all Cygwin windows
- Running C:\cygwin\bin\ash.exe as Administrator
Not overly pretty, but fixes the problem for a while.
I found another gem going through my notes; this one is from a talk by Professor P.R. Kumar (University of Illinois, Urbana-Champaign), his group is doing research in the field of Cyber Physical Systems which for example includes optimization of traffic by enabling communication of cars and street lights.
It turns out there is a sweet spot at about 1 hour commute time, this is roughly what people consider to be okay. Interestingly, you don’t get ecological benefits from shortening their commute below that; they will simply move further out.
From a recent talk about the progress of HIE in CT through the HITE-CT initiative:
The avarage person in CT is seeing nine physicians on a regular basis. As family doctor, I try to limit that and to explain my patients that that is just really nine times the trouble you can get yourself into.
Surprise of the day, it turns out that User is a reserved keyword in T-SQL. You are still allowed to use keywords as identifiers, but you will need to escape them with square brackets:
So far, so inconvenient. But things start getting really pretty when you clicked your schema together with SQL Server Management Studio, which will hide the keyword restrictions from you. Unfortunately Hibernate is not equally generous, so if you go from there and use your generated Hibernate mapping, you will be presented with a beautiful exception:
The solution for my case was to escape the table name in the related User.hbm.xml to table=”[user]”. Mildly annoying caveat: now the file has to be edited manually each time you generate your mappings, since there is no option to wire this type of adjustment into the reveng.xml.