Saturday, October 29, 2011
Thursday, September 08, 2011
Fun little project
Should convert the pascal's triangle base converter to javascript for baseconv.html.
Or just implement it from scratch based on this.
Monday, September 05, 2011
Use the Euro for international transactions
The American dollar is a dangerous investment. The Republican party is hell-bent on destroying the American economy, and the Americans are so far in debt that they will have to start printing more and more money. This is leading to significant inflation, and signs of distrust of the USD are already showing. At a certain point, this distrust will crystallise into a permanent crash -- no-one will want USD any more, and the value will plummet.
The Euro is the best alternative. The notes are far more durable, leading to fewer losses. It is already widely traded and accepted. It is much harder to counterfeit.
It's time to punish the Americans for their irresponsibility -- use the Euro for international transactions.
Monday, August 22, 2011
TrollDad
From reddit
If someone asks you if you can close the door you close the door, open it again and say: yes, I can close the door. And walk back to your original position.
This is the kind of shit my dad does all the time.
Another of his favorites is, if someone asks you to move (or move a body part like "Move your arm") just wiggle around instead of actually moving out of the way.
Or the ever classic;
"I feel like a hamburger."
"You don't look like a hamburger."
Related (with my four year old daughter)
"I don't like hamburgers."
"They always say such nice things about you!"
I prefer: "They probably don't like you very much neither."
"Mom, can you make me a sandwich?"
"Well...okay. POOF! You are now a sandwich!"
-My Childhood
Yeah when I'd say "I'm thirsty" my dad always responded with , "Hi thirsty, I'm Tom."
"what's up?" "the roof" ....sigh
My dad's favorite is when I say "I'm bored." "Funny, you don't look like a piece of wood."
Monday, August 15, 2011
Why use factories?
I'd often heard / seen people using factories in programming. I never really understood the point of having a whole new class just for allocating/creating objects.
There is no reason to have only one factory class. The thing I missed is that the usefulness is obvious once you have two: one real one, and one that makes fake objects for testing the code that relies on the created objects. This allows easily injecting test objects into your tangle of production code/logic without changing the production code.
To really make this work, writing really testable code requires that you use a factory to create almost every object, and that factory might make real objects or test ones. This is the thing that requires constant effort / attention.
(You also don't need a different factory for each class. One for short-lived objects and one for long-lived ones is probably enough.)
Monday, August 08, 2011
Monday, June 27, 2011
Wednesday, June 15, 2011
Business ideas
- Short-range kinect to allow accurate gesture recognition in front of a monitor
- Software company developing physical simulations
Sunday, June 05, 2011
Steam Update slow?
So I'm installing steam, and the update process the installer goes through is painfully slow. This is because the default server is getting pounded. You can't change which server it uses until it's fully installed.
Other sites advise deleting ClientRegistry.blob; I found that this didn't help. Another solution was to reset your external IP address by resetting your router; this was not possible.
Instead, you can trick Steam into trying different servers by killing its connections. Go get TCPView from the microsoft website and run it. Find the Steam connection to the update server (my Steam.exe had only one connection) and kill it. Steam will create a new connection and try to download from a different server.
You might have to kill the connection a few times before the Steam client finds a fast server. You'll know you've got a fast one when the Rcvd Bytes column starts going up fast -- it should get past 1,000,000 within a few seconds. Slow servers don't get past 10-20,000 within 20 seconds.
Fully installing steam requires downloading more than 90MiB . On the default server, at 10 kB/s, this would take about three hours.
Valve should really fix this. The server choosing/indexing needs a bit of fixing.
Thursday, December 23, 2010
Photoresponse in nanowires!!
Well, we finally got a photoresponse out of our nanowires.
The I-V curve is below -- more current when more light is shining on them! Also, strangely non-linear behaviour -- perhaps a schottky barrier at one end between the Pt-Si.
Unfortunately the contacts melted during annealing, but we might yet be able to fix that.
The I-V curve is below -- more current when more light is shining on them! Also, strangely non-linear behaviour -- perhaps a schottky barrier at one end between the Pt-Si.
short wire (1.3 μm) -- massive photoresponse at saturation. The sample was gently shaded with Al foil, still a lot of light leaking in for the dark curve, and just room light for the light curve (more current)
Unfortunately the contacts melted during annealing, but we might yet be able to fix that.
Argh
Argh. Job interview yesterday. Lots of technical questions; I'd come across similar problems previously for almost all of them. Unfortunately, for one of the harder questions I gave a very confused description of a complicated (but efficient!) algorithm. Still kicking myself over that one.
Thursday, December 02, 2010
Hugin Panorama Software
So I discovered Hugin today.
In ubuntu, it installs as you would expect, just add it under the Software tab.
In Windows, the installation is a little more involved. Download the usual setup from the main website and extract it into a directory. Run Hugin to start using it... however, we don't yet have all the magic, due to patent restrictions. To get the remaining magic, head to here, and add the extra executables from the bin directory of the second download into the bin directory of the first download (but don't overwrite anything). *Now* when you run hugin.exe the wizard should be effective.
Works best with high-res, in-focus photos, with a decent amount of overlap.
This program is just magical.
Sunday, October 17, 2010
Ubuntu faster USB loading
Create the file
/etc/modprobe.d/slow_storage
with the contents
options usb_storage delay_use=0
to have Ubuntu not wait when loading USB sticks. Reboot to take effect.
Friday, September 10, 2010
Motivating students
As a tutor, it is important to appear not to know everything and make mistakes. Your students will correct you and pay attention, as they have to make sure you don't get things wrong.
A tutor who never makes a mistake is not interesting.
Saturday, August 28, 2010
A good programming project -- Geant4 Blender Script
So I've developed several particle simulations for our group now, based on Geant4. I'm a little concerned about what will happen when I leave -- there will be no-one around to do simulations! I think people should be able to do them themselves.
Geant4 is a beautiful toolkit, but not particularly easy to use -- a simulation takes several weeks to develop (just learning the interface, setting up commands etc.) and requires a decent working knowledge of C++.
I've also had a reasonable amount of experience with Blender, which has an excellent interface designed for 3D modelling.
I think someone (perhaps me if I find the time) should integrate the two, and distribute a package that allows someone to install it and have complex simulations running within a few hours.
The Geant4 python interface seems like the easiest (if slowest) way to do so, and would be good for a first attempt.
Geometry would be created in Blender, and then the Geant4 Blender Script would send the geometry to Geant4 and run simulations. The results would then either be displayed by Geant4's OGLIX (probably easier) or on the Blender model by creating new objects.
One important option for the Geant4 Blender Script would be a length scale, i.e. "One Blender unit = X metres in Geant4", with options from nanometres to kilometres. Something else that needs careful thought is the results system. How would the results of the simulation be displayed in a scientifically useful fashion? The easiest thing to do would be just to export the particle endpoints (and possibly final energy, direction, energy deposition points, etc. via options) and let the user do the plotting themselves. This is good and bad from a usability point of view -- it makes the interface simpler. The user can use whatever data analysis package they are used to and competent with. For simple plots, such as a final energy spectra, it should be possible to use matplotlib to generate something directly from the script.
I predict that this project would take several months of work. It would likely release a deb package that installed all the requirements (dependency on Blender, the (compiled?) Geant4 libraries (in a separate package?), the script itself.
I would be hesitant about making a Windows version because I don't think it's easy to compile Geant4 for Windows. It's not as though Ubuntu is hard to install anyway, and scientists who need the capability shouldn't mind and probably have access to an Ubuntu machine anyway, or can ask their IT department for a server to run simulations on.
Saturday, August 21, 2010
The Australian Election
So I voted today.
It's quite sad to watch the two largest parties dragging each other down. I prefer to vote for someone with ideals (other than spin and getting elected).
The Liberals seem to be interested almost exclusively in businesses, which tend to be a bit sociopathic in my experience.
Labor are depressing -- they seem confused and quite right-wing. Malcolm Turnbull probably would have saved them, he impressed me on the Chaser last week -- quite statesmanlike, and catching the train! He's not a puppet. Tony Abbott is a bit ridiculous.
The Greens have ideals, but no-one really knows what they'd be like in government.
With any luck Conroy will be dumped.
Friday, August 20, 2010
Where are the aliens?
So I've come up with a few possible reasons why we haven't seen any aliens yet, despite the ridiculous amounts of time they've had to get here.
- There aren't any. Intelligent life realises how pointless existence is, and dies out. Evolution keeps intelligence levels just below this critical level until their resources are exhausted, and they die out without migrating to other planets.
- Interstellar travel is impossible. The energy cost is just too high, or interstellar radiation destroys organized molecules before they get anywhere.
- Interstellar travel is too slow. Travelling 1000 light years (1/100th of the galaxy's diameter) at 1% of lightspeed takes 100000 years, and when you get to the next habitable system you have to spend some time setting up (at least) fuel refineries etc. Intergalactic travel is right out.
- They know we're here, and they're leaving us alone. Not much else to say about this one.
- We're the first. Life just hasn't appeared anywhere else, because conditions are not right on other planets.
Thursday, June 17, 2010
Black Gold
The density of gold is approx 19g/mL.
Price of gold: $46.15 /g
Price of HP#56: $34.87/(19mL * 1g/mL) ~= $2/g
30mL bottle of Pelikan 4001 Fountain Pen Ink: $10.95
1L bottle of Pelikan 4001 Fountain Pen Ink: €30 ~ $43
Pelikan 4001 by weight: $10.95 / (30mL * 1g/mL) = $0.37/g
Pelikan 4001 by weight: $43 / (1L * 1kg / L) = $0.04/g
Wednesday, May 26, 2010
Integral of four Hermite polynomials
Anyone know anything similar to Saalschutz's theorem?
I was trying to simplify the integral of four Hermite polynomials, and I can't get rid of the last summation.
I was trying to simplify the integral of four Hermite polynomials, and I can't get rid of the last summation.


