• Feed

  • « | Main | »

    Blog Research: Programming

    By maurizio | August 7, 2007

    I am planning to give more details on how my Blog Research Software is made in order to get more people attracted to the art of programming. :-)

    I think everyone could build a simple “Blog Reader” to gather some information, just for fun as I started it. The big issue when you start to learn programming is NOT the language you will use or how difficult is to learn a language. The difficult part is to have a well planned idea or at least be able to build incrementally on it (search “Extreme Programming” on google). For example if you want to know how many sites use Wordpress, you could spend month on thinking an idea or just start thinking about a single site.

    To know if a site uses Wordpress you should write a program that read HTML code of your site and then you have to look for the information you want on that HTML. Finished. That’s the first application you can write. The next step will be to use it on 100000 sites. :-)

    You don’t know how to read a single site? Use Google!

    I will give some hints (in Java) here.
    The class URLConnection to connect to a site.
    The class URL which is used by URLConnection.
    BufferedReader,InputStreamReader and InputStream to read the effective information from the site.
    Then the usual
    while ((inputLine = in.readLine()) != null) {
    to manage each line of the HTML code of the site.

    With those information on your hands and with the help of some Java tutorial you will be able at least to print the HTML code of a website.

    If I read more than two comments interested in a complete program, I’ll post it.

    Topics: Programming | No Comments »

    Read other related posts:

  • Today’s game: flow
  • Blog Research: recognizing Wordpress
  • Blogger Research: number of sites
  • Comments

    Subscribe without commenting