Joining is easy.
Subscribe to our announce list. We'll send you a confirmation email in reply. Come back, enter the confirmation password, and you're done!
Linux man 2,3 quick reference
I wrote a script to extract the useful “synopsis” section, from Linux man pages in sections 2 and 3, the syscalls and library calls. This can be good to see what calls there are, and to refresh your memory.
dpkg -L manpages-dev | grep -ie 'man[23]/' | sort | while read file; do if [ -L "$file" ]; then continue; fi man -l "$file" | sed -n '0,/DESCRIPTION\|Feature Test/p' | grep -v -e '^[ \t]*$' -e '^[^ \t]' -e 'Feature Test' | sed 's/^[ \t]*//' echo donedear PLA readers,
I value my membership of Planet Linux Australia.
Around 75% of my blog posts are on-topic for PLA, directly related to Linux or Programming. I counted them.
I have made three potentially offensive off-topic political posts in the last year. The topics were fluoridation, voting for the house of reps, and the US attacks on Libya. I also posted about some simple yoga exercises, a musician I admire, and a board game. My other fifteen posts during that period were on-topic.
I have strong opinions on various topics. If some of my posts offend you, you can reply with polite criticism, you can ask me to tone it down, you can skip those posts, or you can complain to PLA staff that I made you feel sad.
I would rather you don’t complain about me to the PLA staff, because they don’t receive a Sam is nice message, whenever I make someone feel happy.
Now, here is a picture of some beer, so that this post may be considered on-topic for PLA:
And here are two Perl regular expressions, for parsing XML:
/(<.*?>|[^<]+)\s*/g # get tags and text /(\w+)="(.*?)"/g # get attribute names and valuesThis morning, I nearly missed getting off at my train station to go to work because I was too engrossed in writing documentation for the company’s leave accounting system.
I wonder if there’s a 12-step program for people like me. It can’t be healthy.
Below are four of my (150!) browser tabs opened, that I oddly had in sequence.
There has been much made of the pheonmen of lifelong learning and although I thought I had finished my exams when I finished University, I'm still doing them.
From left to right:
Quite a reasonable site, currently invite-only. My worry is my pronounciation will be crap though. I do wish that it did not have to use Flash to accomplish things though.
Nice interface, annoying that it uses YouTube to host videos as that meant I had to whitelist YouTube in Flashblock.
I picked this course as one of the other ones I wanted to do had already closed. I suspect I'll eventually do each of the courses they have on offer. One nice thing is that courses run every 8 weeks or so.
Well presented, but I find that their Javascript interface is extremely slow to startup. It consistently lags behind my typing speed by about 3 seconds.
I'm using Firefox beta, so I'm always running something fairly fast and modern too.
I'm primarily doing this course to see how/what they are trying to teach non-programmers. My feedback is that it is not geared towards someone with no programming knowledge. The initial 10 weeks of Javascript presentation proceeded at a very fast pace. If I weren't a programmer already, I'd have stuggled to keep up.
I'm not a fan of this interface at all, which is why I find it hard to come back to the site each week. I'm not sure exactly why though, since it uses WebM and no Flash. Hurray!!
Either way, I'm doing the Machine Learning class. I tried this last time it was offered and got to week 5 — same week I'm on now — and then I got suddenly busy IRL, so was not able to complete the course.
Unlike Udacity, courses run at set times and you have to do the work on the required dates in order to get the statement of attainment, which can be hard when you are juggling multiple things
Keep in mind, these are just the extra things I have decided to learn. I'm also learning more about Django, Puppet and Python in my work everyday. Plus I'm actually doing a Spanish course in real life too. Oh, and I have a job and I go out. I'm generally actually pushed for time.
Which probably explains why I have not been keeping up with the blog. It isn't because I hate you, although it might be too ;-) , I'm just busy.
I previously wrote about a failure of a USB flash device in my Internet gateway [1]. I have since had another failure in the same system, so both the original 4G devices are now dead. That’s two dead devices in 10 weeks. It could be that the USB devices that I got for free at an exhibition were just really cheap, I’m sure that they weren’t expecting them to be used in that way. The devices from the same batch which are used for their intended purpose (sneaker-net file sharing) are still working well. But in any case I’m not going to resume this experiment until warmer weather. At this time of year some extra heat dissipation from computer gear in my home is more like a feature and less like a bug.
The second USB device to fail appeared to have it’s failure in the Ext4 journal (the errors were reported at around sector 2000), I didn’t keep a record of the problem with the first device, but from memory I think it was much the same.
Rumor has it that cheap flash storage devices don’t implement wear-levelling to avoid patent infringement. If that rumor is correct then any filesystem that uses a fixed journal in the same way as Ext3/4 is probably unsuitable for any serious use on such devices, while a filesystem based on Copy On Write will probably perform better. In Spring I’ll try using BTRFS on cheap USB flash devices and see if that works better. I have another spare device from the same batch to test so I can eliminate hardware differences. I can’t do enough tests to be a good statistical sample, but if a device lasts from Spring to Autumn using BTRFS with the same use that caused failures with Ext4 in a few weeks then I will consider it a strong indication that BTRFS is better than Ext3/4 for such uses.
For the next 5 months or so I’ll be using a hard drive in my Internet gateway system again.
Related posts:
From wikipedia: “The history of water fluoridation can be divided into three periods … The third period, from 1945 on, focused on water fluoridation, which added fluoride to community water supplies.”
Do you recognize that year, 1945? Yes, that’s the year they ended world war two, by dropping two nuclear bombs on the Japanese cities of Hiroshima and Nagasaki, and the nuclear weapons arms-race began. That’s also the year that they started adding sodium fluoride to drinking water in the USA, and later around the world. There is a connection.
Fluoride is used in the process of uranium refinement, and extracted again by depleted uranium deconversion. After using the fluoride to refine uranium, they sell it on the market. Much of it ends up in our drinking water and toothpaste, some after going through other industrial processes. Did they get all the U238 out of that fluoride? No, they did not.
Another major source of fluoride for our tap water is a by-product of the phosphate fertilizer industry. Guess what, phosphate rock contains considerable levels of uranium. The fluoride waste product from this industry, which we put in our drinking water, also contains uranium and other radioactive elements.
Yes folks, your fluoridated tap water contains uranium 238, which was added along with the fluoride, since they did not bother to get it all out. It is not profitable to extract this uranium, so they leave it there in the fluoride, and we drink it. This is a Bad Thing.
Do you know any children with bone-cancer? Well, now you know a likely reason why they got bone cancer – if it wasn’t from all that above-ground nuclear testing.
The fluoride in tap water also causes cheap aluminium cookware to dissolve 800 times more than with pure water. Aluminium damages the brain, and is one cause of Alzheimer’s disease. (Fluoride also affects the brain in its own right.)
Do you know anyone with Alzheimer’s disease? Well, now you know how they likely got Alzheimer’s disease – if it wasn’t from their mercury-lead amalgam fillings.
Oh, did your dentist tell you that it’s safe to put mercury and lead in your mouth for years on end? Well I don’t really agree about that. Have you heard the phrase “mad as a hatter”? What did your high school chemistry teacher say about mercury? Is it safe to ingest it?
Did your dentist tell you it’s great to have fluoride in our drinking water? Did he mention that it’s comes with free uranium? How about the links to bone cancer and Alzheimer’s disease? Or perhaps, we should not screw around with what’s natural; it might be better to drink normal water without those additives.
Dammit, hurry up and save the planet everyone. Voting green would be a good start.
I gave a 10 minute talk on Bodhi Linux at this month's TasLUG Hobart "Distro Wars" themed meeting. The talk slides are in HTML5, so they're embedded below, click on the slide and use your left and right keys to navigate:
The talk as presented, can be found here.
Blog topics: CommunityLinuxUbuntuAnother one of the tweaks I had to make to accomodate Rails streaming responses was ensuring that the Rack::Deflater middleware didn’t run on my app’s streaming actions.
The Deflater middleware gzips your responses before delivering them to the client. This is useful to run on the Heroku Cedar stack because this facility is otherwise not provided. There’s a big gotcha, though: the middleware breaks Rails HTTP streaming responses. There’s a good explanation of this on StackOverflow, as well as a monkey patch to ActionController::Streaming that corrects the behaviour.
I took an alternative, simpler approach. I extended the middleware with support for excluding a URL pattern. This way, I can just disable it on the few actions where I know I am streaming responses. Here’s how it looks:
module Rack class DeflaterWithExclusions < Deflater def initialize(app, options = {}) @app = app @exclude = options[:exclude] end def call(env) if @exclude && @exclude.call(env) @app.call(env) else super(env) end end end endAnd here’s how the extended middleware is included, in config.ru:
use Rack::DeflaterWithExclusions, :exclude => proc { |env| env['PATH_INFO'] == '/order/purchase' }Using an executable proc for the :exclude argument is useful because it then allows for far more sophisticated URL matching than simple string equality (in production, I actually check against a couple of regular expressions).
Wrapping the middleware in this way has worked well. We get to keep it for the bulk of the app, where it’s useful, without it interfering with the parts that are more touchy. It would be nice to see this kind of :exclude option handling become more common among Rack middlewares.
Powered by Twitter Tools
This item originally posted here:
Twitter Weekly Updates for 2012-05-20
Powered by Twitter Tools
This item originally posted here:
Twitter Weekly Updates for 2012-05-20
I just started reading Confessions of an Advertising Man by David Ogilvy of Ogilvy advertising fame. I’m about half way thru it and I think that if you’re in the advertising, media, or the digital/social space, you should definitely read this brilliant book.
He lists four problems that advertising faces, and I highlight excerpts of problem one (highlighting is my own):
The first problem is that manufacturers of package-goods products, which have always been the mainstay of advertising, are now spending twice as much on price-off deals as on advertising. They are buying volume by price discounting, instead of using advertising to build strong brands. Any damn fool can put on a price reduction, but it takes brains and perseverance to create a brand.
Listen to a speech I made in Chicago in 1955:
“The time has come to sound an alarm, to warn manufacturers what is going to happen to their brands if they spend so much on deals that there is no money left for advertising to build their brand. Deals don’t build the kind of indestructible image which is the only thing that can make your brand part of the fabric of life.”
Andrew Ehrenberg of the London Business School has one of the best brains in marketing today. He reports that a cut-price offer can induce people to try a brand, but they return to their habitual brands as if nothing had happened.
Why are so many brand managers addicted to price-cutting deals? Because the people who employ them are only interested in next quarter’s profit. Why? Because they are more concerned with their stock options that the future of their company.
Price-off deals are a drug. Ask a drug-addicted brand manager what happened to his share of the market after the delirium of the deal subsided. He will change the subject. Ask him if the deal increased his profit. Again he will change the subject.
This was David Ogilvy talking about modern group buying sites in 1963.
Yesterday I asked on Twitter: Do you run a restaurant? Have you succeeded in running a group buying deal? Have you seen return customers? Comments like its a scam, anyone that wants a cut price deal is unlikely to return for full price, and even feedback from buyers whom don’t return due to disappointing experiences or how the food just isn’t worth the full price. I had some offline conversations about this and the ones that did return were basically already loyal customers saving money through a deal.
My own thoughts about group buying have been posted before: a Groupon before you close looking at the deal dynamics behind a deal, and some initial thoughts when they first started becoming mainstream.
Related posts:
From: Dave Hall
To: boxes <boxes-module@drupal.org>
Subject: Our Relationship
Dear boxes,
I'm sorry but things just aren't working out between us. It's not you, it's me. I need some time to myself. I need to think things through. I'm not sure what I want. We should spend some time apart. We should try new things. I will miss you, but this is for the best. Let's meet for coffee in a couple of weeks.
Love
Breaking up is never easy, but recently I broke up with the boxes module. I'd been with boxes for a long time, we'd done a lot of good things together. Over time I'd become oblivious to some of boxes' flaws, such as giving black eyes to sys admins who run features reverts on sites where users can edit boxes. Life was pretty good, but my life still felt somewhat empty and incomplete.
One day I was standing in a crowded room with lots of modules on drupal.org and across the room I spotted BEAN. I feel in love instantly. BEAN was decked out in all the latest Drupal 7 gear - fields, Entity API and CTools. The way BEAN moved make me weak at the knees. After another beer I got my courage up, crossed the room and asked if BEAN would like to come back to my site. I was shocked, BEAN wanted to hang out with me and it wasn't just a one night fling. I've been going steady with BEAN for a couple of months now.
Just before BEAN moved in permanently to my dev environment I had to find a way of removing all the remnants of boxes from my life (aka existing sites). It took me less than an hour. I created a new BEAN type and called it "box", I then wrote a little "drush scr" script which converted all of my boxes to BEANs and even updated my contexts to use the newly created BEANs. I hope neither bean or boxes finds my work on github. I chose github hoping neither of them would find my work and also because I don't want to maintain this as a module on d.o.
On a serious note - BEAN is awesome! If you haven't tried it, you really should. BEAN treats blocks as content, not config which is really useful for most sites. For new sites BEAN is a drop in replacement for core blocks or boxes making it super easy to get started. To learn more check out the docs.
If you're interested in seeing the full power of the BEAN module, and other cool stuff I've been working on recently, please comment on my DrupalCon session proposal - An Enterprise Scale Drupal Workflow. It will be a more technical version of my session at Drupal Business Days a couple weeks ago.
* "Full of beans" is phrase commonly used in Australia to describe energetic children.
The Maker Faire is one of those awesome Bay Area things that always fills me with excitement and gets my imagination going.
Zoe and I went again this year to check it out, as best we could within the time constraints we had to work within (opening time and her nap time, minus travel time). She definitely enjoyed herself.
We took the Caltrain, because historically driving and parking has been a bit of a nightmare. The optimal train to get to get there before it opened (at 10am) was the 9:19 train from Mountain View, which was scheduled to get in at Hayward Park a little before 10am. It just so happened that there was a Giants game on in San Francisco today as well, and the train was absolutely packed. We only got a seat because one kind gentleman was getting off and explicitly gave his seat to us. One lesson learned: don't try and take the BOB stroller on the train. Even when collapsed, it's way too bulky. For future Caltrain outings, I'll take our City Mini stroller instead, as it folds much flatter.
I also took our macpac Possum child carrier backpack, and Zoe was pretty happy to just sit in it for the bulk of the time. I think it had novelty value for her, as we haven't used it for a while. I probably could have gotten away without taking a stroller at all. I was very glad I took the backpack, as it gave her a much better vantage point for everything that was going on than she would have gotten from sitting in the stroller.
There was supposed to be a free shuttle from the Hayward Park station to the Maker Faire, but there was a huge crowd waiting for it, so I decided to just walk. It didn't take too long. For the return trip, I think I exited from the wrong side of the fairgrounds, and couldn't figure out the shuttles, so I just walked to Hillsdale station. At least the return train wasn't crowded. Overall, using Caltrain to get in and out was successful. Zoe was very well behaved for the ~30 minute train ride each way.
The Faire was quite a bit bigger this year, and has spilled out into the parking lot on one side. I'd heard stories that O'Reilly had quadrupled booth prices as well.
Trying to abide by the program was too difficult, so we mostly just wandered through the main Expo hall and looked at various booths. I just did a full read through the website of all the exhibitors to see what I missed out on.
Here's some of the stuff I saw in person, or discovered via the website:
Kickstarter is really becoming huge in the maker community. There were heaps of exhibitors there with (mostly robotics) projects that were past the initial prototyping phase and were seeking funding on Kickstarter to go into mass production.
Some of the talks I'd have liked to have seen:
Zoe was really well behaved for the entire expedition. I don't think she really gave me any grief at all. There was a brief period where she wanted me to carry her, but I managed to negotiate her back into the stroller after not long.
I think her favourite was ArcBotics, which had a robot insect that would dance and wave at her. She kept asking for it to do more dancing.