Skip to content


JavaOne 2009: Technical Sessions in PDF

DukeWithHelmetJavaOne 2009 static PDF versions of the technical session slides are available online for viewing and downloading to Sun Developer Network members. :)

Additionally, you can watch JavaOne 2009 General Session videos online from here. Enjoy it. :)

Posted in Java.

Tagged with , .


Google I/O Session Videos and Slides Are Available Online

Google I/O offered 80+ sessions featuring technical content on Google Wave, Android, App Engine, Chrome, Google Web Toolkit, AJAX APIs, and many more. The available session videos and slides from each track are listed below.

googleio

Posted in Google.

Tagged with , .


iTunes Install: The Folder Path ‘C:’ Contains an Invalid Character

Recently, I take the error “The folder path ‘C:’ contains invalid character” when I try to install iTunes 8.1 to my Vista box.

itunes_error

I get rid of this error by following the steps below. It worked for me. Hopefully, it works for you. :D

  1. Open the registry editor by using the command “regedit” from the “Run” window.
  2. Go to “HKEY_LOCAL_MACHINE–>SOFTWARE”
  3. Delete “Apple Computer, Inc.” and “Apple Inc.” items
  4. Try to reinstall iTunes.

registry

And, ladies and gentlemen, please welcome, The iTunesssss (It’ll be nice to give an explosion sound effect in the background. :D)

itunes

Posted in Apple.

Tagged with , , , .


Why Continuous Integration?

ci

Continuous Integration (CI) is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
Martin Fowler

At a high level, the value of CI is to:

  • Reduce risks
    By integrating many times a day, you can reduce risks on your project. Doing so facilitates the detection of defects, the measurement of software health, and a reduction of assumptions.
  • Reduce repetitive manual processes
    Reducing repetitive processes saves time, costs, and effort.

    • The process runs the same way every time.
    • An ordered process is followed. For example, you may run inspections (static analysis) before you run tests—in your build scripts.
    • The processes will run every time a commit occurs in the version
      control repository.
  • Generate deployable software at any time and at any place
    CI can enable you to release deployable software at any point in time. From an outside perspective, this is the most obvious benefit of CI. With CI, you make small changes to the source code and integrate these changes with the rest of the code base on a regular basis. If there are any problems, the project members are informed and the fixes are applied to the software immediately.
  • Enable better project visibility
    CI has the following positive effects.

    • Effective decisions: A CI system can provide just-in-time information on the recent build status and quality metrics.
    • Noticing trends: Since integrations occur frequently with a CI system, the ability to notice trends in build success or failure, overall quality, and other pertinent project information becomes possible.
  • Establish greater confidence in the software product from the
    development team
    Overall, effective application of CI practices can provide greater confidence in producing a software product. With every build, your team
    knows that tests are run against the software to verify behaviour, that
    project coding and design standards are met, and that the result is a
    functionally testable product.

References:
[1]
Continuous Integration by Martin Fowler
[2]
Continuous Integration: Improving Software Quality and Reducing Risk by Paul Duvall, Steve Matyas and Andrew Glover

Posted in Agile, Software Engineering.

Tagged with , .


My Top Free iPhone 3G Applications – Part 1

After two weeks experience with iPhone 3G, I decided to share some free applications that I liked most. Here is the list:

  1. Evernote [iTunes Link]: Evernote for iPhone (and iPod Touch) lets you capture any moment or idea as it happens, wherever you may find yourself. And, thanks to Evernote’s amazing cloud-based sync, you can recall it all any time from your iPhone, Mac, PC, the Web, or other mobile device.
    Features:

    • Create and edit new notes on the fly
    • Snap a photo right into your account
    • Record a quick voice memo
    • Easily access all of your notes
    • Select notes for offline viewing

  2. Wikipanion [iTunes Link]: “Wikipanion is the best and fastest Wikipedia browsing application for the iPhone”. It is designed for easy, search, navigation and display of Wikipedia entries. Streamline your browsing with history grouped by visit date, and bookmarking that not only bookmarks individual entries but individual sections within an entry.
    Features:

    • Fast: Wikipanion uses a direct connection to the Wikipedia servers, making it extremely fast.
    • Smart: Wikipanion understands the page. Wikipanion pulls out meta material from the page, understanding sections and related foreign language pages.
    • Convenient: Wikipanion meshes the Wikipedia with your iPhone. Get automatic search results while you type. Set your own font size that is saved and applied to every page with no future adjustment. Your last visited page is opened up from when you last left the application.
    • International: Wikipanion goes international. Set a primary search language. Switch between different language versions of the page. Quickly retry an existing search in another language.

  3. Facebook [iTunes Link]: Facebook for iPhone makes it easy to stay connected and share information with your friends. Use your iPhone to start a conversation with Facebook Chat, check your friends’ latest photos and status updates, look up a phone number or upload your own mobile photos to Facebook while on go.
    Features:

    • Notifications
    • The full news feed
    • News feed story comments
    • People search
    • Friend requests
    • Photo tagging
    • Photo captioning
    • Photo posts to your friends’ Wall
    • Your entire inbox, plus the sent folder and updates tab
    • Inbox search
    • Message attachments

  4. Airme [iTunes Link]: Airme lets you capture the moment with your iPhone camera and instantly share it with your friends and family. Airme currently supports:
    • Facebook
    • Flickr
    • Picasa
    • Twitter

    You can take most photo sizes and include your own custom tags or use the built in popular tag lists. Landscape and portrait photos are supported.

  5. Dictionaire [iTunes Link]: Dictionaire is an easy to use, no fluff dictionary app for your iPhone. Helps you find words when you need to.
    Features:

    • 140,000 definitions
    • Helps you find words that “sound like” others
    • Short, simple definitions

Enjoy your applications. :D

Posted in iOS.

Tagged with , , , .


Properties of Good Tests: A-TRIP

I had a conversation with my friend as follows:

– How can I run my unit tests in some specific order Çetin? I need to execute them in order, otherwise some of my tests fail.
– Unit tests must be “independent”. So, you don’t need any order in fact and you can’t guarantee it also.

I tried to explain him why they must be independent shortly. After this conversation, I opened my unit test reference book (Pragmatic Unit Testing in Java with JUnit) and looked again the properties of good unit tests to refresh my memory. Let’s remember them together briefly:

  • Automatic
    Unit tests need to be run automatically. Invoking one more unit tests can’t be any more complicated than pressing one button in the IDE or typing in one command at the prompt.

    Don’t introduce a test that breaks the automatic model by requiring manual steps. Think about a man sitting in front of the machine waiting for popups to confirm. It is not we want. Whatever test requires (database, network connection etc.) make these an automatic part of the test.

    A machine should be running all of the unit tests for all checked-in code continuously. This automatic check ensures that whatever is checked-in hasn’t broken any test, anywhere. Investigate systems such as Cruise Control, Hudson, Teamcity, Anthillpro, Apache Continuum etc.

    Test must determine for itself whether it passed or failed. It means you don’t have to think about it. No one needs to read the test results to check whether the code is working or not.

  • Thorough
    Good unit tests are thorough; they test everything that’s likely to break. But just how thorough? Every line of code, branch, exception or most likely candidates for error like boundary conditions, missing and malformed data, and so on. It’s a question of judgment, based on the needs of your project (time, effort, budget). If you want to aim for more complete coverage, then you may want to invest in code coverage tools (EMMA, Cobertura, Clover etc.) to help.
  • Repetable
    The goal is that every test should be able to run over and over again, in any order, and produce the same results every time. This means that tests cannot rely on anything in the external environment that isn’t under your direct control.Use mock objects (JMock, EasyMock, JMockit, and so on) as necessary to isolate the item under test and keep it independent from the environment.

    Each test should produce the same results every time. If it doesn’t, then that should tell you that there’s a real bug in the code.

  • Independent
    Tests need to be kept independent from the environment and each other. Make sure you’re only testing one thing at a time. It doesn’t mean that you use only one assert in a test, but that one test method should focus on a method, or a small set of production methods that, together, provide some feature.

    Independent also means that no test relies on any other test; you should be able to run any individual test at any time, and in any order. You don’t want to have to rely on any other test having run first. Use per-test and per-class setup/teardown methods to get a fresh start.

  • Professional
    The code you write for a unit test is real. This means that it must be written and maintained to the same professional standards as your production code. You write lots of test code (as much as real code) therefore, test code needs to be kept neat and tidy, well designed and well-factored, just as professional as the production code.

So, a-trip always makes you feel good.
Happy testing. :D

Source: Pragmatic Unit Testing in Java with JUnit

Posted in TDD.

Tagged with , , , .


5 Tips for Debugging Java Code in Eclipse

5 tips you can use while debugging your Java code in Eclipse.

  1. Logical Structure
    The logical structure is very handy for examining things like maps and other java collections classes, instead of showing the full detail of all the internal variables the view will only show the “logical” pieces. It is activated/deactivated from “Variables” view using logical structure toggle button.


  2. Conditional Debugging
    Once you know where an error occurs, you will want to see what the program is doing right before it crashes. One way to do this is to step through every statement in the program, one at a time, until you reach the point of concern. Sometimes it’s better to just run a section of code and stop execution at that point so you can examine data at that location. It’s possible to declare conditional breakpoints triggered whenever the value of an expression changes. In addition, code assist is available when typing in the conditional expression.

    Right click your breakpoint and select Breakpoint Properties… to set a condition. Check “Enable Condition” box and write your expression below it. You can define a “hit count” that stops your code after that count is reached if you want.

  3. Java Exception Breakpoint
    Use “Java Exception Breakpoint” feature to track your exceptions more easily. For example, your program might be throwing a NullPointerException or FileNotFoundException and you want to track it down. Rather than go to the line of code and set a breakpoint, you can specify that the debugger should always stop when the exception occurs.

  4. Step Filtering
    “Step Into” is one of the most used feature while debugging the source code. Sometimes, it takes us through several stack traces to reach the code we want to debug. In such cases, “Step with Filters” functionality can help us. It simply filters out the classes that we don’t want to step into.

    To specify which classes to filter out when “Step with Filters” is used, the preferences must be set. To activate the preferences panel choose Window > Preferences from the main window. Once there navigate to Java > Debug > Step Filtering and choose the classes/packages to be filtered out. When you step through the code, ensure that the “Use Step Filters” toggle button in Debug view is on.

  5. Expression Evaluation
    “Inspect” is a handy feature for evaluating your expressions. In the Debug perspective, select your expression, right click it and select “Inspect” from the menu to evaluate. You can do it by simply Ctrl+Shift+I key combination.

    “Display View” is another efficient helper in evaluating expressions. Activate it from Window > Show View > Display, write your expressions to evaluate and execute them by right clicking and selecting “Display” from the context menu in the Debug perspective or simply by Ctrl+Shift+D shortcut. You can use code assist (Ctrl+Space) to compose your expressions.

Happy debugging. :D

Posted in Eclipse, Java, Tips & Tricks.

Tagged with , , , , .


25 Popular Social Music Services

I try to list (randomly) popular social music services in this post. It is not the complete list of course. We can add our discoveries to this list. I hope you enjoy it. ;)

  1. Last.fm
    Users can create custom radio stations and playlist from any of the audio tracks in Last.fm’s music library, and are able to listen to some individual tracks on demand, or download tracks if the rights holder has previously authorised it.

  2. Imeem
    Imeem is a social media service where users interact with each other by watching, posting, and sharing content of all digital media types, including blogs, photos, audio, and video.

  3. Pandora
    Pandora is an automated music recommendation and Internet radio service (US only for now).

  4. Finetune
    Type an artist’s name, finetune creates a playlist of related songs for you to listen to. Explore the finetune community – browse artists, users, playlists and more.

  5. Mog
    Listen to millions of full-length songs for free. Share your music library, playlists and opinions on music. Discover music recommended by users who share your musical tastes.

  6. Myspace Music
    MySpace is now one of the biggest social network site on the Internet. So it’s obviously a great place to hunt for music if you are looking for recommendations from friends.

  7. iLike
    Discover new music with your friends. Over 20 million people use iLike to share music tastes and playlists, and to learn about new artists and concerts together.

  8. RadioBlogClub
    Bookmark your favorite tracks and build-up your playlist. Then listen to your juke.blog player.

  9. Jango
    Custom radio that plays the music you want.

  10. iJigg
    Discover, rate and download free music.

  11. Grooveshark
    Free streaming. Social networking. Music discovery.

  12. Live365
    Thousands of free online radio stations.

  13. Musicovery
    Interactive web radio with attractive user interface.

  14. UPlayMe
    Keep up with friends and meet people through the music & videos you’re playing right now.

  15. QLoud
    Qloud provides the music experience users want: unlimited, on-demand, free music from endless library.

  16. Audiofarm
    Audio sharing.

  17. Mystrands Music
    Browse and share popular music.

  18. Musicmesh
    Discover related music and artists.

  19. Jiwa
    Hundreds of thousands of songs to listen to unlimited.

  20. Soundpedia
    Rediscover music you like.

  21. Media Master
    Your music. Anywhere.

  22. Deezer
    Music on-demand.

  23. Sideload
    Free music on the internet to sideload into your locker.

  24. Tun3r
    Your mood. Your station.

  25. Fiql
    Source for music and video playlists.

Happy listening. :D

Posted in Web 2.0.

Tagged with , , , , , .


Great Firefox Extension: Read It Later

Sometimes, I cannot find time to read my daily selected articles. I bookmark them, later I forget to read. E-mailing those articles can be a solution, however it is not effective and takes time to manage.

“Read It Later” is a Firefox extension that creates a manageable list of links to be read later. New features of it for Firefox 3 users are:

  • One click saving, sorting, tagging
  • Sync your list with any number of computers
  • Offline reading
  • Access anywhere
  • RSS feeds
  • Click to save mode
  • Save all tabs for later

Let’s see it in action:

  1. You like a page and want to save it for later reading. Just click the little “tick” at the end of the address bar. It is added your list and the little “tick” turns red. You can add links to your list by right clicking on the link and selecting “Read This Link Later”.

  2. You want to read them now. Click the little “book” icon in the navigation toolbar and select the desired link from the list.

  3. You are complete with the link and want to delete it from the list. Just click the “tick” icon in the address bar one more time, select the “Just Mark As Read” button to delete it. You can add your link to losts of social sites here before deletion if you want.

Tip: You can add links to your list quickly with the “Click to Save Mode” option. You click the links and they are added to your list automatically rather than followed through. It is activated by pressing “Alt + m” or clicking the little red “tick” icon in the bottom right corner. Try it.

Detailed explaination about “Read It Later” is here.
Firefox add-on page for “Read It Later” is here.

I think, it is great. Happy reading. :D

Posted in Firefox.

Tagged with , , , , .


My Top 10 Source Code Search Engines

Here is my top source code seach engines and I wanna share them with you.

  1. Google Code Search

  2. Krugle
  3. Byte My Code
  4. Dzone Snippets
  5. Code Fetch
  6. Codase
  7. Snipplr
  8. O’reilly Code Search
  9. JSourcery
  10. Merobase

Please share yours with us.
Happy coding. :D

Posted in Online Tools, Programming.

Tagged with , , , .