How a Wired article sent the price of Bitcoins skyrocketing
Disclaimer: I am not an economist and I do not claim to have more than a freshman level understanding of it either. Economics was not my favorite subject and I often find it perplexing. What follows is only based on observation; I may not have considered all variables (mainly due to my ignorance of them). Either way, I thought what happened was pretty interesting. If there are any errors in my assumptions or observations, please feel free to correct me.
Bitcoins are a digital currency. Bitcoins aren’t issued by a bank or a central authority. Instead they are generated by computers when they solve complex problems (for more details, go here and here). I haven’t really read all the details about bitcoin exchange rates and how the bitcoin economy works, but at the very least I know that it does follow the law of supply and demand. So when demand increases and there is a fixed supply, the price will increase (bitcoins are constantly being generated, but it appears that demand is outstripping the rate of generation).
About two weeks ago is when I first decided I would try and get some bitcoins of my own. I decided I would try to generate them and assumed I would have some pretty soon (but I obviously didn’t know the details; it’s a little bit like winning the lottery). So I joined a mining pool online at bitcoinplus. I’ve around .04 bitcoins right now (not much). This was obviously taking too long so I thought about looking into buying some bitcoins. I checked the price over a period of days, it was hovering around $8/bc. I didn’t buy any and decided to check up on it later. A few days later (on the 3rd), I checked again, and this time the price had jumped to a little over $14/bc! What caused this spike? A day later, the price spiked again. This time to about $19/bc! I wasn’t sure what was causing the spike because the price had been more or less stable for the last few weeks.
That’s when I came across this Wired article that my friend sent me. It’s about an underground website (that is also anonymous) that lets you buy any drug. The drugs are priced in bitcoins. It would seem that there are a lot of people interested in buying these drugs and therefore these people require bitcoins. I’m theorizing that this is what led to the increased demand for bitcoins and hence the spike in bitcoin prices.
The Wired article was posted on the 1st of June. You can clearly see from the following charts how the price of bitcoins jumped on that one day (it’s about a jump of 30% on the 1st). The biggest spike was on the 4th; essentially a price increase of approximately 350% in just four days! Since the 4th, the price seems to be slowly coming down. Currently it’s sitting at around a little over $18/bc. I’ll probably keep a watch on the price of bitcoins over the next few days to see what happens. I’m assuming that the demand will die down and therefore the prices should eventually come down as well. Looking into this has actually ignited some interest in me to learn a little bit more about bitcoins and the bitcoin economy.
Normally you hear of currency values and stock prices rising on falling based on events in the world (positive or negative). It’s amazing to see how one little thing can change the prices of commodities. In particular, I found this (bitcoin) example particularly interesting because it’s a relatively insulated economy (i.e., it doesn’t seem to be affected by factors in the traditional market).
tl;dr version: Bitcoin prices were hovering around $8/bc. They jumped to $19/bc when Wired magazine posted an article about an underground market where you can buy illegal drugs using bitcoins.
Update: I was looking at closing prices and so it was showing only prices from the end-of-day. Here’s a chart that includes yesterday’s data. The closing price was a little over $30/bc. That’s an almost 700% increase since the 1st!
Popularity: 6% [?]
Integrating Regula with Spring 3.0.x MVC
A little less than a year ago, I released Regula, an annotation-based form-validation written in Javascript. The source and documentation are available on GitHub. I started working on the integration on and off throughout most of last year. At the end of the year, I had a pretty good integration going, where you could annotate fields with Hibernate Validator annotations, and the corresponding Regula validation-code would be generated on the client side. Of course, I wasn’t done yet because what I had was simply a demo project and I had to figure out a good way to distribute the whole thing; I was able to finish up the packaging and distribution today. With minimal setup, you should be able to get started with Regula and Spring. You don’t need to go through this post to figure out how to use the integration. This post is mostly about how I accomplished the integration (I don’t go into all the details; just the important bits). As far as actually using it, I will make a blog post about it later.
The source for the integration is also hosted on GitHub. My approach towards translating validation constraints from the server-side to the client-side was two-fold: gather validation constraints from the object and represent it in a canonical form. Using the canonical form, generate Javascript code that uses Regula for validation. To do this, I created a service that examines a domain object and gathers all information regarding its properties and validation constraints. The service returns this information in a canonical form, that I then inserted into the model. On the client-side, I had a tag that used the canonical form and outputted Javascript that uses the Regula framework. Initially, I was calling the service explicitly from an action in the controller. Later, in an effort to make the integration less-invasive and more seamless, I used an aspect-oriented approach with interceptors. In fact, that’s where I’d like to start.
Read more »
Popularity: 5% [?]
Packaging and distributing taglibs in a JAR
This is more of a “note to self” than a “how to”.
If you’re trying to distribute tag files in a JAR, you need to put them under /META-INF/tags. You then need to create a TLD file that you also put under /META-INF/tags. If you have tags or functions that you created in Java, and want to distribute them alongside the tag files, you need to reference them in the TLD and package them in the same JAR (goes without saying).
If you want to do the same thing in maven, the location for the tag files and the tld file is different; you need to put them in src/main/resources/META-INF/tags. Then you can run mvn package and maven will create a JAR with your tags.
Read more »
Popularity: 5% [?]
Mono on Ubuntu: Package dotnet35 was not found in the pkg-config search path
I’m taking a C# and .NET class at ASU East. Our professor has example code that runs on Windows and the Mac (using Mono). I installed mono 2.8 from this link and I was able to get C# code to compile. However, when I tried to run my professor’s build script (he uses ant with some .NET extensions), I got the following error:
[dn:csc] Package dotnet35 was not found in the pkg-config search path.
[dn:csc] Perhaps you should add the directory containing `dotnet35.pc’
[dn:csc] to the PKG_CONFIG_PATH environment variable
[dn:csc] No package ‘dotnet35′ found
[dn:csc] error CS8027: Error running pkg-config. Check the above output.
To fix this, I set the value of PKG_CONFIG_PATH to /usr/local/mono/2.8/lib/pkgconfig (you’ll need to add this to your .bashrc). If you used the mono install-script without modification, then the value of PKG_CONFIG_PATH should be /opt/mono-2.8/lib.
Popularity: 3% [?]
Bytecode optimization in Java
I learnt something new about bytecode optimization today. In languages like C and C++, if you’re really concerned about efficiency, you can drop into assembly mode and write specific assembly code instead of relying on the compiler to convert your C/C++ code into assembly (compilers can optimize, but not as well as humans in all cases).
I saw a question on Stackoverflow today that talked about the getfield opcode in the context of the trim() method in the String class. In the trim() method, you have the following comments:
int off = offset; /* avoid getfield opcode */ char[] val = value; /* avoid getfield opcode */
The author of the question wanted to know what these comments mean. This question seemed pretty interesting to me and so I went and did some research. I found out that getfield is an operation that lets you get access to the member variable/field of a class. This operation is fairly expensive as it involves indexing into the runtime constant pool. Performing this operation a few times does not really incur a performance hit. It is when you perform the operation multiple times, that performance becomes an issue. You can see this from the next few lines of code:
while ((st < len) && (val[off + st] <= ' ')) {
st++;
}
while ((st < len) && (val[off + len - 1] <= ' ')) {
len--;
}
Now if the author of the trim() method hadn’t assigned offset and value to local variables, a getfield operation would be performed every time the loop-condition is tested. This is obviously inefficient. Therefore, the author assigned the the values of offset and val into the local variables off and val. So now, instead of getfield you have iload (for off anyway), which performs much faster.
Popularity: 4% [?]
A Minecraft Stargate
I’ve been playing Minecraft for a while now. It doesn’t look like much at all, but it’s a really fun game. I love the fact that you can build whatever you want. It’s like legos, really. Anyway, I built a Stargate in Minecraft. I originally wanted to use the portal blocks, but if you stack two or more together, they just vanish. So I decided to make inner part of the Stargate out of glass and water. This means that you can’t walk through it, but it still looks kinda neat. I figure that I could make a wall of water if I had a trough that ran through the middle. But this would mean that you would fall into the trough every time you stepped through the Stargate. There might be other ways… I’ll see if I can figure it out. I used lightstone for the chevrons. The gate is bigger than it would be normally, but that was the only way I could make a circle that looked decent.
This is with the default texture-pack in Minecraft. It would probably look better with a better texture-pack.
I’ll try to build a DHD next. Probably won’t be able to make it look as nice as the original, though.
UPDATE
Here are some better pictures. I’m using the Minecraft Enhanced Texture Pack 256×256. I also noticed that I had placed one of the lightstones in the wrong place. I fixed that.
Here is the world file (it’s a zip) if you want to check it out. It’s from my multiplayer server and so there are a bunch of other creations on there, that my friends made.
Popularity: 22% [?]
Broadband speed-test results for T-Mobile’s HSPA+ network
I’m at Phoenix Sky Harbor airport waiting for my (delayed) file to Orange County. I was having trouble connecting to Sky Harbor’s free Wi-Fi and so I decided to tether to my G2. The phone was showing all four bars on the HSPA+ network and so I decided to run a speed test. This is what I got:
The average speed for T-Mobile as reported by speedtest.net is around 2Mbps, so I’m surprised that mine is so high. I ran a few more tests and I got results between 2.5Mbps and 3.5Mbps. What bothers me the most is that T-Mobile’s mobile network provides a better upload speed than the measly 896Kbps that Qwest gives me.
Popularity: 3% [?]
Navy Railgun and Shuttle Ascent video
I came across a cool video of the Navy’s Mach 8 Railgun. That’s right. Mach 8. The railgun uses 33Mj; the aim is to get it to 64Mj. The previous record (by the same lab) was 2 years ago at 10.64Mj. There are still a few issues to work out, namely power consumption and heat dissipation. A railgun has no moving parts and simply uses electromagnetic energy to shoot a projectile. They can also be powered by the ship’s batteries. The Navy is expecting to deploy these to ships by 2020 or 2025.
The other video I came across is one explaining all aspects of the launch of a space shuttle (what the engineers look for, etc.). The video is 45 minutes long, but it is extremely informative and well worth it to watch.
Popularity: 5% [?]










