Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 1 hour 27 min ago

Paul Wayper: Converting cordless drill batteries

Thu, 2014-07-10 16:26
We have an old and faithful Ryobi 12V cordless drill which is still going strong. Unfortunately, the two batteries it came with have been basically killed over time by the fairly basic charger it comes with. I bought a new battery some time ago at Battery World, but they now don't stock them and they cost $70 or so anyway. And even with a small box from Jaycar connected to the charger to make sure it doesn't cook the battery too much, I still don't want to buy another Nickel Metal Hydride battery when all the modern drills are using Lithium Ion batteries.

Well, as luck would have it I recently bought several LiIon batteries at a good price, and thought I might as well have the working drill with a nice, working battery pack too. And I'd bought a nice Lithium Ion battery balancer/charger, so I can make sure the battery lasts a lot longer than the old one. So I made the new battery fit in the old pack:

First, I opened up the battery pack by undoing the screws in the base of the pack:

There were ten cells inside - NiMH and NiCd are 1.2V per cell, so that makes 12V. The pack contacts were attached to the top cell, which was sitting on its own plinth above the others. The cells were all connected by spot-welded tabs. I really don't care about the cells so I cut the tabs, but I kept the pack contacts as undamaged as possible. The white wires connect to a small temperature sensor, which is presumably used by the battery charger to work out when the battery is charged; the drill doesn't have a central contact there. You could remove it, since we're not going to use it, but there's no need to.

The new battery is going to sit 'forward' out of the case, I cut a hole for my replacement battery by marking the outline of the new pack against the side of the old case. I then used a small fretsaw to cut out the sides of the square, cutting through one of the old screw channels in the process.

I use "Tamiya" connectors, which are designed for relatively high DC current and provide good separation between both pins on both connectors. Jaycar sells them as 2-pin miniature Molex connectors; I support buying local. I started with the Tamiya charge cable for my battery charger and plugged the other connector shell into it. Then I could align the positive (red) and negative (black) cables and check the polarity against the charger. I then crimped and soldered the wires for the battery into the connector, so I had the battery connected to the charger. (My battery came with a Deanes connector, and the charger didn't have a Deanes connector cable, which is why I was putting a new connector on.)

Aside: if you have to change a battery's connector over, cut only one side first. Once that is safely sealed in its connector you can then do the other. Having two bare wires on a 14V 3AH battery capable of 25C (i.e. 75A) is a recipe for either welding something, killing the battery, or both. Be absolutely careful around these things - there is no off switch on them and accidents are expensive.

Then I repeated the same process for the pack contacts, starting by attaching a red wire to the positive contact, since the negative contact already had a black wire attached. The aim here is to make sure that the drill gets the right polarity from the battery, which itself has the right polarity and gender for the charger cable. I then cut two small slots in the top of the pack case to let the connector sit outside the case, with the retaining catch at the top. My first attempt put this underneath, and it was very difficult to undo the battery for recharging once it was plugged in.

The battery then plugs into the pack case, and the wires are just the right length to hold the battery in place.

Then the pack plugs into the drill as normal.

The one thing that had me worried with this conversion was the difference in voltages. Lithium ion cells can range from 3.2V to 4.2V and normally sit around 3.7V. The drill is designed for 12V; with four Lithium Ion cells in the battery, it ranges from 14.8V to 16.8V when fully charged. Would it damage the drill?

I tested it by connecting the battery to a separate set of thin wires, which I could then touch to the connector on the pack. I touched the battery to the pack, and no smoke escaped. I gingerly started the drill - it has a variable trigger for speed control - and it ran slowly with no smoke or other signs of obvious electric distress. I plugged the battery in and ran the drill - again, no problem. Finally, I put my largest bit in the drill, put a piece of hardwood in the vice, and went for it - the new battery handled it with ease. A cautious approach, perhaps, but it's always better to be safe than sorry.

So the result is that I now have a slightly ugly but much more powerful battery pack for the drill. It's also 3AH versus the 2AH of the original pack, so I get more life out of the pack. And I can swap the batteries over quite easily, and my charger can charge up to four batteries simultaneously, so I have something that will last a long time now.

I'm also writing this article for the ACT Woodcraft Guild, and I know that many of them will not want to buy a sophisticated remote control battery charger. Fortunately, there are many cheap four-cell all-in-one chargers at HobbyKing, such as their own 4S balance charger, or an iMAX 35W balance charger for under $10 that do the job well without lots of complicated options. These also run off the same 12V wall wart that runs the old pack charger.

Bringing new life to old devices is quite satisfying.

Paul Wayper: A Glut of Music?

Thu, 2014-07-10 16:26
I finally read David Gerard's original article, and I have to say there were some pretty sweeping assertions in there. Mainly that quantity always trumps quality, every time, no exceptions. That, personally, I think is ... a bit overstated. There are plenty of examples of people still liking the old quality stuff over the new quantity stuff - my nieces love my Eighties music just as much as they like the new popular hits. And plenty of people still listen to classical music and are interested in music that is strictly of fixed quantity - Beethoven sonatas, for example.

The other big generalisation is that this works purely on a cost amortisation calculation. I.e. that musicians are trying to cover costs, and therefore the cost of producing physical units and distributing them is the governing factor. Some musicians also look to make a living from their work, and that means setting a time period over which they hope to gain money from selling the product, an amount which they expect to live on, a number of units to sell, and so forth - all of which can vary widely and are complicated to fix. (Aside: this is why established artists push for extension to copyright - because theoretically they're extending the amount of time they gain from selling that product. This is a myth and a fairy story record labels tell them when they want them to support copyright extension.) It used to be that the cost of producing the units and distributing them were the major costs - see Courtney Love's calculation, for example - and therefore the label proposes to take that risk for the band (another fairy story); nowadays the distribution is free, and producing a new unit is cheap (in the case of digital distribution, it's totally free), so the ongoing costs of keeping the musicians alive and producing new music is the major cost for professionally produced music.

But I still think the big points made in the article is true: that the real cost of producing music - even music of reasonable quality - is coming down, that more music than ever is being produced and hence there's much more competition for listener's money, and that "hobby" artists who do it in their spare time and don't expect to make money out of their music (I'm one) drives the cost of actually getting music down too. So for professional musicians, who have sort of expected to make money out of music because their heroes of the previous generations did (due, as David points out, to a quirk in history that made the twentieth century great for this kind of oligopoly), it's a rude awakening to find out that people don't care about your twenty years in the industry or your great study of the art form, they care about listening to a catchy tune that's easy to get.

I also like the point that musicians are also inveterate software copiers. It's one reason I use LMMS and free plugins - because free, quality software does exist. I find it intensely hypocritical that professional musicians can criticise people for copying their music, when they may well have not paid a cent for all the proprietary software they use to produce it.

But to me this is really just about getting in touch with your audience. Companies like Magnatune exist to help quality artists find an audience by putting them in touch with an existing large subscriber base who wants new music. Deathmøle's insane success on Kickstarter shows that someone with an established audience can make it really big without having to sell their soul to big record labels. And Jeph himself is a great example of the way things work in the modern world, since Deathmøle is his side project - his main one is Questionable Content, which he also went into without having existing funding or requiring a big backer to grant him some money and take his rights in exchange. As Tim O'Reilly says, obscurity is a far greater threat to authors and creative artists than piracy; it doesn't matter if you're signed to the best record label there is, if they haven't actually publicised your work you might as well have not signed up at all. And, fortunately, these days we have this wonderful thing called the internet which allows artists to be directly in touch with their fans rather than having to hope that the record label will do the right thing by you and not, say, ignore you while promoting another band.

I wish David had made his point without the broad generalisations - I think it stands well without them.

Paul Wayper: Workplace Loyalty

Thu, 2014-07-10 16:26

Paul Wayper: The Day We Fight Back?

Thu, 2014-07-10 16:26

Paul Wayper: Ignorable compression

Thu, 2014-07-10 16:26

Paul Wayper: A Glut of Music?

Thu, 2014-07-10 16:26

Andrew Pollock: [life] Day 160: Chattahoochee Nature Centre

Thu, 2014-07-10 16:25

Zoe woke up early this morning, but mid-breakfast decided to go back to bed for a bit. I don't think she actually went back to sleep. Not sure what that was all about.

After breakfast, we drove over to the Chattahoochee Nature Centre to check it out.

Alongside the Chattahoochee River, the place was beautiful. The main thing we saw was the butterfly garden and a butterfly enclosure in a large screened tent with some flowers. Everyone was given a sugar-water drenched sponge on a stick, and the kids had a great time trying to entice butterflies onto the sticks.

There were also a few birds of prey in cages we took a look at, and then we walked around the lake, stopping to have lunch, before we headed back. It was a lovely morning out.

When we got home, the girls played in the wading pool in the backyard and generally around the house until dinner time. I used the time to try and pack as best I could.

I found a place that did Chicago-style deep dish pizza, so I ordered a pizza from them and Chris picked it up on the way home. It was delicious. I think I need to figure out how to make deep dish pizza myself.

Tomorrow morning, we head off to Austin. It's been a lovely time in Decatur, Georgia.

Andrew Pollock: [life] Day 159: Georgia Aquarium and a walk in the woods

Thu, 2014-07-10 16:25

I had a broken night's sleep for some reason. Zoe woke up at one point and ended up in bed with me. She slept quite late, and I ended up needing to wake her up so that we could get away on time. Even as it was, we left 30 minutes later than planned.

We spent the morning at the Georgia Aquarium. It's a pretty impressive facility. I've never been that impressed by the Monterey Bay Aquarium, but this one is certainly good. Zoe had a good time checking out everything, but it was a bit of a challenge herding four kids in the same direction at various times.

All the busy days may have been taking a bit of a toll on her, because she had a couple of minor meltdowns at the aquarium today, but recovered quickly and seemed okay otherwise.

After lunch and a little more looking around, we headed back home so James could take his nap. Briana ducked out and ran a few errands, and I held the fort down. The girls mostly disbanded and played on their own, and I finally got on top of all the photos I've been taking.

Clara had a piano lesson at 4:30pm, so we dropped her off for that, just around the corner, and went for a walk in the woods nearby. It was a beautiful little loop, that reminded me of the woods in Zurich a little bit. Unfortunately Lucy got stung by something while we were there.

I managed to get Zoe down for bed pretty early again tonight, and we don't have any tight time constraints in the morning, so I should be able to let her sleep in for as long as she likes tomorrow morning.

Matt Palmer: Doing Password Complexity Wrong

Wed, 2014-07-09 07:57

I just made an account on yet another web service. On the suggestion of my password manager, I attempted to use the password “W:9[$X*F”. It was rejected because “Password must contain at least one non-alphabet character, one lowercase letter, one uppercase letter”. OK, how about “Passw0rd”? Yep, that’s fine.

Anyone want to guess which of those two passwords is going to fall victim to a brute-force attack first? Go on, don’t be shy, take a wild shot in the dark!

BlueHackers: 7 Things to Remember When You Think You’re Not Good Enough

Tue, 2014-07-08 14:01

“We can’t hate ourselves into a version of ourselves we can love.” ~Lori Deschene

Andre Pang: Starcraft: The Zerg Campaign

Tue, 2014-07-08 09:28

It appears that Andrew Lee has finished the Zerg Campaign in Starcraft. Amusement follows.

Overmind: Greetings underlings. I’m so cool I shit ice-cream. And I’ve got a new toy - this super important mega-death weapon thing that’s currently breeding in a Chrysalis. It’s a big big secret what’s inside but when she pops out, she’ll lay the smackdown on everything! I’m not telling anyone what’s inside the chrysalis so it’ll be a total surprise when she awakens. Also, since hot babe Kerrigan just died in Chapter 1, it can’t possibly be her. And if it is her (which it’s not), it’ll be such a cunning plot twist that you’ll wet yourself.



It’s like totally important that this Chrysalis thing is protected. So, amongst all my legions of creatures, I am going to choose… my most young and inexperienced Cerebrate to protect it.



All the other Cerebrates: Erm… boss… you sure about that?



Overmind: Of course I’m sure! I’m the Overmind! Okay… so little young cutie teacher’s pet newbie Cerebrate, there’s a few things you need to know before you begin your life as protector of the chrysalis… are you ready?



Newbie Cerebrate: Yes boss.



Overmind: Ok. This… is a drone.



All the other Cerebrates: Oh for fuck’s sake.



Overmind: And when you have enough minerals, you can build a Pwning Spool.



Newbie Cerebrate: Minerals… Pwning Spool… Got it.



Cerebrate Daggoth: Things sure are dull now that Overmind is cuddling Newbie over there. Hey Zasz, can I ask you something?



Cerebrate Zasz: Sure Daggoth.



Daggoth: So, we’re like masters of evolution right?



Zasz: Yeah.



Daggoth: So we can evolve from little larvae things to become anything at all right?



Zasz: Yeah.



Daggoth: So, we could look like… I dunno… Jessica Alba… or the Asian chick from Battlestar Gallactica… but instead we look like pulsating grey pieces of shit.



Zasz: Sucks dunnit. Anyway, that’s why Overmind nabbed Kerrigan. He’s been totally getting into Japanese tentantacle porn…



Daggoth: …



Overmind: And then you right click and build a Hydralisk Den. That let’s you build Hydralisks. That’s why it’s called a Hydralisk Den.



Newbie: Hey boss. I’m grateful that you’re taking the time to explain all this to me. But it’s been like 15 levels now and I think I’m ready to do a bit more. How about we push the storyline a bit.



Overmind: Ok. Go kill Terrans.



Newbie: (Kills Terrans)



Overmind: Go kill Protoss.



Newbie: (Kills Protoss)



Overmind: Go kill renegade Zerg.



Newbie: (Kills renegade Zerg) Script writers took a break on this chapter huh?



Overmind: yeah. Go kill more stuff till the Chrysalis thing hatches.



Newbie: Okay.



Raynor: Hey, I’ve been having these wacky dreams… as if Kerrigan were calling out to me. But I know that’s impossible because she died in Chapter 1.



Zerg Kerrigan: Hi everyone! I’m back. It was me in the Chrysalis. How cool and unexpected was that!



Everyone with IQ over 7: Shit me a brick! We all just wet ourselves!

Raynor: Oh my God. Sarah! What have they done to you?



Zerg Kerrigan: I’m a Zerg now. (wins Most Obvious Statement award)



Raynor: Well, I’ve still got a hard-on for you. So…are we going to bonk or are you going to kill me?



Zerg Kerrigan: Well, I want to kill you. But some strange lingering emotion inside me compels me to let you go. Some emotion stronger than any Zerg power over me. I… I don’t know what it could be. Leave Jimmy. Leave now.. before it’s too late. Must… control… (but how about we get together in the expansion set)

Raynor: Ok. Bye.

Zeratul: I’m an invisible Dark Templar Protoss. No one can see me and I’ve got this cool Jedi Lightsabre! I’m hunting Cerebrates… Charrge! (kills Zasz)



Zasz: Arrrggh (dies)

Overmind: Shame about Zasz. But when Zertaul shoved his light sabre up Zasz’s ass, I connected with Zertaul’s mind and now I know where the Protoss Homeworld is! Suck that Zeratul.



Zertaul: Bugger. (runs away)

Overmind: Cool, let’s go invade the Protoss Homeworld. The most important thing there is the Khaldarin Crystals, the source of all power!!! Since this is the most important thing ever after protecting the Chrysalis, I’m going to pick the Newbie Cerebrate again to take control of all my forces. Newbie, go to the Protoss Homeworld, steal the crystals and then kill all the Protoss there.



Newbie: Hey big boss, can I ask you a few questions?



Overmind: Of course my little cupcake:



Newbie: Well firstly, in Chapter 1, Mensk and Kerrigan turned on that one Psi-emitter rubics cube and “Zerg from across the galaxy” were lured to it. So how is it that the Protoss Homeworld, filled with 10 billion Psychic Protoss, is completely invisible to us?



Overmind: Err…



Newbie: And then there’s this thing about the Khaldarin Crystals. We only just found out about the Protoss Homeworld five minutes ago when Zeratul shoved his sabre up Zasz’s ass and you looked into his mind…so how is it that we know all about the Crystals and exactly where they are, so much so that we’ve set up a big friggin’ Neon Lit beacon over the beacon saying “BRING DRONE HERE”. But the Protoss, who have lived on the planet since forever AND who have a special upgrade called “Khaldarin Amulet”, don’t have a clue about the Crystals?



Overmind: Shut the fuck up. Now, go steal the crystals. Just look for the beacon.



Newbie: Yes boss. (steals the Crystals)



Overmind: Now do the Crystal Thing… and I can plant my fat ass down on the Protoss Homeworld. YEAH!

Andre Pang: Xcode Distributed Builds Performance

Tue, 2014-07-08 05:26

[Sorry if you get this post twice—let’s say that our internal builds of RapidWeaver 4.0 are still a little buggy, and I needed to re-post this ;)]

Xcode, Apple’s IDE for Mac OS X, has this neat ability to perform distributed compilations across multiple computers. The goal, of course, is to cut down on the build time. If you’re sitting at a desktop on a local network and have a Mac or two to spare, distributed builds obviously make a lot of sense: there’s a lot of untapped power that could be harnessed to speed up your build. However, there’s another scenario where distributed builds can help, and that’s if you work mainly off a laptop and occasionally join a network that has a few other Macs around. When your laptop’s offline, you can perform a distributed build with just your laptop; when your laptop’s connected to a few other Macs, they can join in the build and speed it up.

There’s one problem with idea, though, which is that distributed builds add overhead. I had a strong suspicion that a distributed build with only the local machine was a significant amount slower than a simple individual build. Since it’s all talk unless you have benchmarks, lo and behold, a few benchmarks later, I proved my suspicion right.

  • Individual build: 4:50.6 (first run), 4:51.7 (second run)
  • Shared network build with local machine only: 6:16.3 (first run), 6:16.3 (second run)

This was a realistic benchmark: it was a full build of RapidWeaver including all its sub-project dependencies and core plugins. The host machine is a 2GHz MacBook with 2GB of RAM. The build process includes a typical number of non-compilation phases, such running a shell script or two (which takes a few seconds), copying files to the final application bundle, etc. So, for a typical Mac desktop application project like RapidWeaver, turning on shared network builds without any extra hosts evokes a pretty hefty speed penalty: ~30% in my case. Ouch. You don’t want to leave shared network builds on when your laptop disconnects from the network. To add to the punishment, Xcode will recompile everything from scratch if you switch from individual builds to distributed builds (and vice versa), so flipping the switch when you disconnect from a network or reconnect to it is going to require a full rebuild.

Of course, there’s no point to using distributed builds if there’s only one machine participating. So, what happens when we add a 2.4GHz 20” Aluminium Intel iMac with 2GB of RAM, via Gigabit Ethernet? Unfortunately, not much:

  • Individual build: 4:50.6 (first run), 4:51.7 (second run)
  • Shared network build with local machine + 2.4GHz iMac: 4:46.6 (first run), 4:46.6 (second run)

You shave an entire four seconds off the build time by getting a 2.4GHz iMac to help out a 2GHz MacBook. A 1% speed increase isn’t very close to the 40% build time reduction that you’re probably hoping for. Sure, a 2.4GHz iMac is not exactly a build farm, but you’d hope for something a little better than a 1% speed improvement by doubling the horsepower, no? Gustafson’s Law strikes again: parallelism is hard, news at 11.

I also timed Xcode’s dedicated network builds (which are a little different from its shared network builds), but buggered if I know where I put the results for that. I vaguely remember that dedicated network builds was very similar to shared network builds with my two hosts, but my memory’s hazy.

So, lesson #1: there’s no point using distributed builds unless there’s usually at least one machine available to help out, otherwise your builds are just going to slow down. Lesson #2: you need to add a significant amount more CPUs to save a significant amount of time with distributed builds. A single 2.4GHz iMac doesn’t appear to help much. I’m guessing that adding a quad-core or eight-core Mac Pro to the build will help. Maybe 10 × 2GHz Intel Mac minis will help, but I’d run some benchmarks on that setup before buying a cute Mac mini build farm — perhaps the overhead of distributing the build to ten other machines is going to nullify any timing advantage you’d get from throwing another 20GHz of processors into the mix.

Andre Pang: WWDC Craziness

Tue, 2014-07-08 05:26

  • Meet new people (✓),
  • Catch up with fellow Aussies I haven’t seen in years (✓),
  • Go to parties (✓),
  • Behave appropriately at said parties (✓),
  • Use the phrase “Inconceivable!” inappropriately (✓),
  • Work on inspiring new code (✓),
  • Keep up with Interblag news (✗),
  • Keep up with RSS feeds (✗),
  • Keep up with personal email (✗),
  • Keep up with work email (✗),
  • Installed Leopard beta (✓),
  • Port code to work on Leopard (✗),
  • Successfully avoid Apple Store, Virgin, Banana Republic et al in downtown San Francisco (✓),
  • Keep family and friends at home updated (✓),
  • Mention the words “Erlang”, “Haskell” and “higher-order messaging” to puny humansfellow Objective-C programmers (✓),
  • Write up HoPL III report (✗),
  • Find and beat whoever wrote NSTokenField with a large dildo (✗),
  • Get food poisoning again (✗),
  • Sleep (✗),
  • Actually attend sessions at the conference (✓ ✗).

Andre Pang: Goodbye, World

Tue, 2014-07-08 05:26

Yeah. So the other day, I walk into my local AppleCentre to buy myself a nice new STM bag. Of course, since I’m there pretty much every third hour of the day…

  • Me: “Can I have myself an André discount at all?”
  • Manager: “Hmmm… well, normally I would, but I can’t do that today. How about I throw in a free copy of World of Warcraft? Yes, that sounds like an excellent idea…”

Nooooooooooooooooooooo! Tom, I officially hate you. Do you know how long I’ve been trying to avoid playing this frigtard game? Goodbye sunshine, it’s been nice knowing you. If I don’t reply to any emails from now on, I’m either dead, or I’m playing this bloody MMORPG that I’ve been avoiding so successfully up until now. Bye all!