Git Merge Options

Comments

I recently learned about the -X option for git merge, which allows you to specify options for the merge strategy. I was trying to merge a branch which had changes in whitespace throughout several files. With just the default options, git did a pretty bad job and there were a lot of large conflicts with no obvious difference besides whitespace. But then a coworker told me about "-X ignore-space-change". With that option, there was only a single small conflict, which was easy to resolve.

Next Error

Comments

You know you're doing some major refactoring when you find yourself searching for "visual studio keyboard next error". Thanks Stack Overflow! It's F8, by the way. I fixed over a thousand build errors today.

Writing a CMS

Comments

I'm writing a CMS (Content Management System) from scratch to run this blog. You're looking at it right now. It's probably a dumb idea, but it sounds like a fun project to me right now. My old blog was a WordPress blog, which is currently at blog.krazeike.com.

Buying Bitcoins Isn't Easy

Comments

I recently bought some bitcoins. I’ve been interested in them for a while and wish I had bought some sooner. If you’ve ever tried to buy bitcoins, you know it’s not that easy. Currently, the most popular exchange is MtGox, which is based in Japan. Before you can even deposit money into MtGox, you have to get your account verified, which requires sending a scan of an ID (e.g. a driver’s license) and a proof of residency (e.g. a bill addressed to you). That’s annoying for two reasons. First, I don’t have a scanner. Second, all my bills are delivered electronically. I guess I could just give them a PDF of one of my electronic bills, but I don’t know whether they’d accept that. Instead, I found a physical copy of something sort of like a bill and scanned it at work.

After I got my account verified, there was the matter of making the transfer itself. I’d never transferred money outside the US before and it’s not as simple as transferring money between two US banks. There’s a lot more information you need to fill out. You have to provide the address of the bank you’re transferring to and the address of the business that owns the account you want the money to go to (MtGox isn’t a bank itself, it just has an account at a bank where you transfer your money). One silly problem I ran into was that I had no idea how Japanese addresses are formatted. The wire transfer form at my bank had separate fields for “city”, “state/province”, etc. But the address provided on MtGox’s website wasn’t formatted that way, so I didn’t really know which part of the address was supposed to go in each field. I remember having to read Wikipedia page about the Japanese postal system before I was able to make a reasonable guess.

You also have to state the type of business you’re transferring the money to and the purpose of the transfer, which is a bit odd. With my bank, there was also this additional authentication process where they sent me an email at a particular time and I had to open it and electronically sign something within like 2 hours of receiving the email. Oh, and it can take a week or two for the transfer to go through, unlike the usual 3 days for domestic transfers.

There could also be future inconveniences. I haven’t done my taxes yet, but I vaguely remember from last year there being a question about foreign bank accounts or foreign transfers or something like that. So doing my taxes could be that much more painful this year, as if they weren’t painful enough already. I’m guessing it increases my chances of being audited too.

Besides the inconvenience of transferring money outside the US, it’s also expensive. My transfer was for $2,000 and I ended up paying roughly $75 in fees just to transfer the money. Another weird thing about it is that you don’t even know beforehand how much the transfer fee is going to be. I knew that my bank would charge $40, but I guess you can’t know exactly how much the receiving bank will charge or what intermediaries it may go through on the way and what they will charge. I figured it would cost somewhere between $40 and $100 total to make the transfer, but I only found out exactly how much it was after the transfer was complete and I saw how much money made it into my account. On top of those transfer fees, there’s also the trading fees you pay to actually buy the bitcoins.

I was also a little worried whether my money would actually go to the right place. That’s because one of the pieces of information you have to include with the transfer is a number identifying you to MtGox so that they know whose account to credit. The problem was that MtGox’s website said to include the number as a “message” with the transfer, but my bank had no field for a message in the transfer. It did, however, have a “special instructions” field, so I added an instruction which said “Please include the following message: <my number>” and hoped that whoever or whatever was looking at those instructions would get the idea.

Anyway, I did finally get my bitcoins. But going through this whole process took quite a bit of time. Also, I put off doing it for a couple months just because I knew what a hassle it was going to be. And of course the price of bitcoin went up significantly during the course of those months I put off buying them. Fortunately, I still got in before the really big price spike happened about a month ago. I look forward to my bitcoins being actually useful one day. I’ll have more to say about that in a future post.

Useful websites for robotics

Comments

When I wanted to start building a robot recently, I had no idea where to look for parts and information. I’ve learned quite a bit since then, so I thought I’d just share a list of useful websites I’ve found.

Here are places where I’ve bought parts:

  • hobbytown.com – HobbyTown has physical locations in my area, so I went to one mostly just to check it out. It was pretty small and didn’t seem to have much of the sort of stuff that I wanted, but I bought some tools and asked the salespeople some questions about motors.
  • batteryspace.com – As the name says, this place has tons of batteries. I bought a couple 12 V batteries with barrel connectors to match my mainboard. I also bought a couple motors, a connector, and a charger. The prices seemed pretty good. My only complaint was that shipping seemed a little slow. Waiting for parts is hard when you’re excited to get started building.
  • sparkfun.com – I bought a bunch of stuff here: wire, diodes, capacitors, a protoboard, and some screw terminals.
  • ghielectronics.com - This is where I got my FEZ Cobra II mainboard, which I discussed previously. They also have lots of other .NET Gadgeteer modules and mainboards.
  • servocity.com – Don’t let the name fool you — they have a lot more than just servos. I bought a lot of chassis parts here: small machine screws, motor mounts, wheels, wheel hubs, and metal brackets. Shipping was very fast and they event included some candy with my order!
  • digikey.com – This place has an insanely large amount of small electronics parts. What’s awesome is that you can look for parts in a very structured way. You can navigate to a category of part and then you can filter the parts by their specifications (dimensions, voltage, style, etc.). It’s very nice for finding something particular. I bought a lot of little stuff: capacitors, header pins, standoffs, resistors, and alligator clips.
  • And of course, don’t forget about Amazon and Home Depot. I bought a soldering iron and some wire on Amazon. I got some wood, screws, and tools at Home Depot. The best thing I found at Home Depot were some small caster wheels. I needed them to be a particular height to match my other wheels and Home Depot had some that were perfect in the toolbox aisle, of all places.

Here are some other parts stores. I haven’t bought parts at these places yet, but they seem to have a good catalog:

Here are some other random sites I came across that looked interesting, but which I haven’t really explored yet:

If you’ve read this far, you’re probably wondering what I’ve been using all these parts for. Well, I’m afraid I’m going to have to save that for a future post.

Finally, if you happen to be in the Seattle area (like me), you should check out the Seattle Robotics Society. Meetings are once a month. They’re free and open to anyone.