The Carbon Economy
(View high quality video on YouTube)
It’s time for real
Hellmann’s – It’s Time for Real from CRUSH on Vimeo.
The State of The Internet
JESS3 / The State of The Internet from Jesse Thomas on Vimeo.
(View high quality video on YouTube)
Hellmann’s – It’s Time for Real from CRUSH on Vimeo.
JESS3 / The State of The Internet from Jesse Thomas on Vimeo.
Higly recommend every developer to use Gist to share the snippets.
It’s really great!
Fine, this topic has been talked many many times, and you can find a lot of great answers over the internet. Stackoverflow.com listed a lot of answers. And also, you can find great approach from Joshua Bloch’s Effective Java also pointed out 2 effective approaches. What’s more, Joshua Bloch also provided an enum approach(Page 31) as the best practice for Serializable Singleton. If you like Wikipedia, you can also find a Java solution for Singleton, and for deep background knowledge behind this approach, please read “Double check locking” and “Java 5 memory management” by Bill Pugh.
If you are as lazy as me, just remember the following implementation, which is thread safe and can be used on all the java version. The key point in this implementation is using Java atomic class load mechanism to guarantee the thread safe and using static method to implement lazy initialization.
If you also have some curious on the other implementations, please keep reading.
After reading all of these, I don’t think you need any other implementations, but to understand why and how these implementations work, you need read something more[Typically those links I provided at the beginning]. There are things called Google and Bing on the earth, I guess you can find the answer very soon.
I saw an interview question.
Write a function to reverse a string.
It’s a simple question, Hmm? But not so simple.
In Java, StringBuilder class provided a convenient method to reverse the characters it holds, and in C#, we have a static method Array.reverse() to help us. Also, we can write it by ourselves(it’s not a big deal, right?).
OK, let’s take a look at how we can do this.
It’s simple. Hmm? We turn the string into char array, and swap the array element. It’s done.
If we use the API provided by .NET Framework, it will be much more simple.
Since Visual Studio 2008 still does not provide a colorful editor for Visual C++, I decided to find some solution. I’m lucky, I found Visual Assist X very quickly. This is a highly recommended plug-in for C/C++ developers on Windows platform. I even suspicious that Microsoft and Whole Tomato(The company created Visual Assist) had a agreement that Microsoft will not develop any powerful editor for Visual C++ developers. Why? cause you can find out the C# editor is providing some basic functions that Visual C++ editor does not have.
Look at this.
![]()
Any way, this a great tool, and it is a must-have plug-in for Visual C++. [Get a copy and take a trial] of Visual Assist X and take a look these wonderful features.
Recently, I started a new open source project for practicing C++ and Windows Programming. I chose google to host my project. Now I think I made the right choice.
Google Code is great! Especially, it integrates a wiki-style document authoring tool. That is fantastic! I really like it. Before I started to use google code wiki page, I had tried to learn these syntaxes on Wikipedia.com, but I failed, I thought those mark up language was too difficult to remember. I was wrong. It’s not those mark-up’s fault, it’s wiki who did not provided a clear tutorial to new users. On the other hand, google dose provided an easy way to understand these mark-ups. That’s a short sample code within the edition box. That really helps!
I will try much more about wiki style from now on.
I got it today. Why I missed this when I read the HTTP RFC document 5 years ago? Maybe I just ignored this part. Shit!
Here, please view Bill Venners article written in 2006 when he interviewed Elliotte Rusty Harold.
Here, to see what Elliotte Rusty Harold said about REST.
And here to see what is REST on wikipedia.
One thing to remember, there are 4 HTTP verbs, GET, POST, PUT, DELETE, not just 2. Someone killed the other 2 we don’t familiar with.
I designed this new version, and it’s still under developing and tuning.
[Updates: 2010/02/03] Implement the "Recent Posts", and "Random Posts" feature.
[Updates: 2010/02/04] Updated “About” and “Contact” page.
I don’t want to write one post twice and post them to Live space and my own wordpress system one by one. Is there any good solution to write once and post once, but post to both 2 blog system?
Further more, if it could be implemented by Windows Live Writer, it could be the best plan.
Please tell me if you have any good solution.
Thanks in advance.
After a few days struggling, I decided to confess that I was a loser for work in 2009, and also, I’m a luck man for life in 2009.
I started this year with the biggest failure project in my life as a software engineer. July 2008, Apple released iPhone in 32 countries, lucky enough, I was in Japan, which was one of the first 32 countries. I bought the iDP program soon after I got my iPhone on July 25, 2008, and I started to build my first iPhone app.
After learning Objective-C and iPhone development for about 2 weeks, I thought I was ready to start my first iPhone project. Before I started, I did some homework(But was not enough), I didn’t have much money, I didn’t have many resources, I didn’t have any experience in game development. What I had was some language learning experience(I found out later that experience is hard to be turned into application). I was a programmer and project leader in enterprise software development, actually, I knew nothing about what people need and want in consumer market.(My Weakness: Don’t know too much about consumer market.)
But I decided to challenge myself. So I tried to start my first app: gogoSpeak Japanese on Sept 2008. I planed to make this application an platform for Japanese language learning, but as I studied AppStore everyday, I gave up this idea in middle of Oct 2008. And decided to created a application with my own contents like scripts and audios and pictures. I tried to do this because I didn’t have money to buy some contents and I did not want to violate other company’s rights. (Big Mistake 1: Underestimated the difficulty to make language learning contents.)
I decided to start the coding at first. (Big Mistake 2: content first or app first.). I thought I could create the app and define the working flow, so after that I could create some content to fit this working flow and app. That was wrong, and I realized this more than a half year later.
After I started the coding for 2 or 3 weeks, I had to go to an contract work started from Nov 10th 2008, and ended at the end of March. For some other things I returned to gogoSpeak’s development at Jun 2009, that was a year after iPhone debuted. Damn it, I wasted a whole year!(I had to: make some money to continue the iPhone development.)
I continued the development on the weekend during I was a contract employee, but I did not make any progress because I made the biggest mistake(Big Mistake 3)ever. I was trapped in a technical problem for over six months! I also used my iPhone ITS support credits along with iDP and did not get the right answer. If I could go back to that time, I would tell myself that either give this feature up or spend some money to resolve this problem. It was really hard for me to get myself out of that trap. Why I was trapped in such a stupid problem? I know I want to make this application better with this feature, but why I could not obey some basic management role that I often talked about 2 years ago(At that time, I was a good project leader)?
In early July 2009, I figured out how to resolve the technical problem and started to make my own contents. Until that time, I realized how difficult to make some good language learning contents. If I could go back again, I would definitely create the content at first then create the application.
Finally, I submitted gogoSpeak to AppStore on Aug 23th, 2009. One year behind my original plan. I explained to my friend that iPhone need us code faster, but I could not do it myself. What a loser I am!
After August, 2009, I started a new plan to created some other applications. I carefully reviewed those mistakes I made during making my first iPhone app. This time I finished my second app(iPinyin) in one month and it’s still in the top 100 paid application(Education) in Japan. But this time, this application was not good enough because it did not become a hit app. It has good contents which I prepared for over 2 weeks to record the voice of each Pinyin, but the usability was not good enough, the user experience was not good enough, the UI was not good enough. I compromised to myself that I need to finished this in one month. I still consider this app has a good idea, but bad implementation(My Weakness: Easy to compromise).
Later I read some blog from Tapity which was maintained by Jeremy, and another blog is Tap Tap Tap(Yeah, the Tap Tap Tap created the famous voice and unit converter on AppStore!) . Jeremy wrote one sentence that really touched me: Developers compromise, developers lose. I thought this is the reason why I did not success. Thank you Jeremy. And also, Tap Tap Tap told me that what a really consumer market is. Look at those apps created by Tap Tap Tap, I believe they are doing the best on non-game categories on AppStore. Jeremy analysed a lots of Tap Tap Tap’s secrets of success. Tap Tap Tap and Jeremy are now my best teacher.
In the end of 2009, I took a look back of my career. Because of so many compromises I made before, my life sucked. I decided to make a new start in 2010 without compromise. I will try to rebuild my confidence and my pride.
Compare to my work, my life was a little bit lucky, after my wife arrived to Tokyo on April 2009, I thought a new life was began, I’m finally living with my lovely wife and I believe we will live happily forever.
Watching my wife making impressive progress on Japanese, that’s really why everyday ended with happiness.
As Jeremy said, Developers compromise, developers lose. I will not compromise again, I will do everything in my best. Here is some goal.