Sunday, October 6, 2013

Alright, first post.

I'm learning to java for the very first time. Did you know that kids third my age are learning how to code java? Fuckin kids these days, man. Holy fucking shit, these 8-9 year olds are like, pretty damn good. With their minecraft programming and shit. What the fuck is minecraft anyway..


So. Fuck that all, and let's start. Today I'm going to learn how to make a pretty simple program that reads a text file. I need this for work one day. This will make my day job SO much easier. So basically some days I will need to digitise a picture of a plot in a digitising program (like Global Mapper). Then I'll need to put in the coordinates of points in this picture to another text file.It's straight forward, but what's not straightforward is the fact that I have to type in each coordinate manually. It takes A FUCKING LONG TIME, EVERY SINGLE FUCKING TIME. So I need to know how I can make it easier. There was this really shitty diagram, with fucking hundreds of points (I gotta draw a curved elliptical shape and a bunch of squiggly shapes) - and that took me a good couple of days to make a decent plot out of the picture.

I found this link http://www.homeandlearn.co.uk/java/read_a_textfile_in_java.html

Should be good, but what the fuck, is up with the url? Fucking hell, is it a website for stay at a home mums?! I'm guessing they need java to power up their fucking toasters or something. Fuck that. Anyway, this is good. Something to start with.

So I started with this, and I got an error message. FUCK.

package textfiles;
import java.io.IOException;

public class FileData {
    public static void main{String[] args} {}
}   

It stays I need to put in a ; somewhere. I also need to define void.

Then I added this to another Class object called ReadFile

package textfiles;

import java.io.IOException;
import java.io.FileReader;
import java.io.BufferedReader;

public class ReadFile {

}

It's 1.20 am and I got work tomorrow. Will pause this now, and play some CK2 then I'll have to go to bed.

No comments:

Post a Comment