Tuesday, October 28, 2014

Passed my first course with flying colours!

I've nagged about this everywhere online today, but I'm genuinely happy about passing my first course with the highest grade and lots of praise I didn't expect.

The goal in my coding is to make readable good code that's safe and generally well structured and built. It feels nice when it pays off, and I just love coding more and more for each day.

So I'm celebrating by bying myself a new mouse and keyboard that they had on a daily sale today. My mice are failing so I need at least one new, and I'd like a USB keyboard.

Oh, and the other week I made an avatar for the Java room's bot. While I gloat in my happiness you can have a look:


Monday, October 20, 2014

The difference between Java and JavaScript

Java is a cake and JavaScript is a cookie.

Java goes with the different C programming languages, and they are cakes. Like cheesecake, strawberry shortcake and sponge cake. (People who knows the different languages gets to decide which one is which) They are different cakes with different ingredients and flavors and all of that, but still all cakes.

JavaScript belongs in the same category as PHP, Python and Ruby, and they are cookies. Like raisin cookie, chocolate-chip cookie and gingersnaps. These are also very different cookies, but still in the same category of cookies.

HTML and CSS in this simile are cereals. While they are still edible, they're not pastries.


(Note: this is just for laughs, no hate on which one is which or need to mention that the languages are not in the same categories in how they work ex. Java is object-oriented, C is not)

Monday, October 13, 2014

Master of Arrays!

So what have I done tonight? Arrays. I now feel like I can graduate as a master of arrays.

I've done arrays at startup, arrays of primitives, arrays of objects and ArrayLists.

Now I only have to master everything else. But small little play-abouts like I did tonight is fun.

Next step? I'm thinking learning about collections. I should master those too. Feels like a logical next step.

Saturday, October 11, 2014

AFK Coooking



I can cook quite well if I do say so myself, but cooking is quite dull, boring and comes with a ton of dishes. So I thought I'd share with you my AFK (Away From Kitchen) cooking with minimal amount of dishes.

Lately I made up a fairly tasty yet simple home-made thai-food inspired dish. You can pretty much add any vegetables you like into this mix, this is just how I make it.


package food.lazy.Omnom

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * My recipe for Thai-inspired food.
 *
 * @author Me
 */
public class ThaiFood {
 
    public static List<Object> dishes = new ArrayList<>();
 
    public static void main(String[] args){
     
        Scanner sc = new Scanner(System.in);
     
        // These are the items you need to prepare the food
        Cutlery spatula = new Cutlery("spatula");
        dishes.add(spatula);
        Cutlery cuttingboard = new Cutlery("cutting board");
        dishes.add(cuttingboard);
        Cutlery knife = new Cutlery("knife");
        dishes.add(knife);
     
        // These are the utensils you need to cook the food.
        Pot pot = new Pot();
        dishes.add(pot);
        FryingPan pan = new FryingPan();
        dishes.add(pan);
     
        /*
         * These are the ingredients you need.
         *
         * The vegetables can be anything you like. Just buy a bag of frozen
         * wook vegetables at the store or make your own by buying a bunch
         * of veggies and either freeze them yourself or put them in fresh.
         */
        Food vegetables = new Food("vegetables");
        Food noodles = new Food("egg noodles");
        Food chicken = new Food("chicken");
     
        // The spice
        Food redCurry = new Food("red curry");
        Food soySauce = new Food("soy sauce");
        Food sNsSauce = new Food("sweet and Sour sauce");
        Food salt = new Food("salt");
     
     
        System.out.println("Hungry? And lazy? Here's how you make a nice thai-inspired wook, lazy-style! \n\n" +
                            "Here's what you do:\n");
     
        pot.add(chicken);
        pot.cook(chicken);
     
        System.out.println("");
        pan.add(vegetables);
        pan.cook(vegetables);
        pan.add(soySauce);
        pan.add(sNsSauce);
        pan.add(salt);
        pan.add(redCurry);
     
        System.out.println("");
        spatula.stir(pan);
        spatula.get(chicken);
     
        System.out.println("");
        pot.takeOut(chicken);
     
     
        System.out.println("\n* Keep the pot with chicken water on the stove,\n" +
                            "  but turn the plate off until right before the \n" +
                            "  vegetables in the are done.");
     
        System.out.println("");
        knife.cut(chicken, cuttingboard);
        pan.add(chicken);
     
        System.out.println("");
        spatula.stir(pan);
     
        System.out.println("");
        pot.add(noodles);
     
        Cutlery strainer = new Cutlery("strainer");
        dishes.add(strainer);
     
        System.out.println("");
        pot.takeOut(noodles);
        strainer.get(noodles);
     
        Cutlery fork = new Cutlery("fork");
        dishes.add(fork);
        Cutlery plate = new Cutlery("plate");
        dishes.add(plate);
     
        System.out.println("");
        System.out.println("Total number of items to dish: " + dishes.size());
    }
}

Yes this is a working program. I spent all night on it.

Friday, October 10, 2014

Studying something you love

It's so nice to be studying something you love. I began coding around ten last night and now it's nearly half passed seven in the morning. I want to keep going, but I got to a part I've never really learned, and I'm too tired to think or understand what I'm reading.

So continuing from here is more or less impossible... but I'll live.

I'll bear the code with me in my dreams, and I'll logic my way to a solution. Right now I'm stuck on trying to create something I should be able to make, I'm just too tired to brain.

It's a nice feeling though; I've been at it for so many hours and I still just wanna continue! I've already ordered my JavaFX textbook and I feel so ready for it! Finally some GUI!

The things I wanna make somehow make more sense if you're thinking with the visuals.

I hope I can catch some zeds soon.

Code something

Code something I'm giving up on you.
I'll write some code if you want me to.
Anywhere I would have coded too.
Code something I'm giving up on you.

And I am so small
It was over my head
I know nothing at all

And I will stumble and fall
I'm still learning to code,
just starting to call.

Code something I'm giving up on you.
I'm sorry that I couldn't get(); to you.
Anywhere I would have coded too.
Code something I'm giving up on you.

An I will swallow my drink
Java's the one that I love,
and I'm starting to think.

Code something I'm giving up on you.
I'm sorry that I couldn't get(); to you.
Anywhere I would have coded too.
Code something I'm giving up on you.

Code something I'm giving up on you.

Code something...

Saturday, October 4, 2014

Future hope

The photo appears to be taken by this photographer:
http://www.mlorenzphotography.com/ Pay it a visit!
Although I'm currently battling the question "am I object oriented enough?" I still feel optimistic about the future.

I can't wait until we start learning JavaFX. I really want to start working with GUI. Somehow I imagine it will make my programming better. It will be fun none the less.

So apart from working on my course examination program, I finally found my drawing utensils, So here's a little I-haven't-drawn-anything-in-3-months doodle:


Friday, October 3, 2014

Female Programmers


For some reason there aren't many female programmers. Girls - at least in my country - are increasingly better at math and physics. Girls are topping the national results of test and more girls get into university than ever before. Yet, so few girl programmers.

My theory, based on growing up as a girl myself, is like so:
While girls are encouraged to study, girls are not encouraged to actually do anything that revolves around math and physics, or engineering. Draw a pretty pony is ok, but build a pony with Mechano, or worse, god forbid, build a vehicle! Girls needn't bother their pretty heads with that. In other words, gender stereotypes.

Now, children and teens (as a general) are not aware of that they are being subjected to stereotypes; children just assume that whatever the adults teach them is how things are. If noone tells a child she can work with computers, make her own programs and apps, she won't know she can do that.

Even with gender stereotypes, girls can become programmers. You want a nice horse game? Or a pretty princess app? Go for it! Do what you think is fun! Use all that studying math you've been doing pick up programming! The internet is full of teach-yourself-how-to-program tutorials. If you can follow a photoshop tutorial on how to put on makeup on your pictures, you can follow a programming tutorial.

Most girls I've met who takes an interest in creative processes and/or IT ends up as self-taught web-designers (I myself started out there too). A frustrating business even as a girls since it's over-saturated, and these girl normally ends up just making stuff for their own blogs. Blogs which they earn more money from than the actual coding of it, and that's still not a whole lot.

So I was thinking, maybe I should address that issue myself later when I'm done becoming a programmer myself. It's nothing radical, but I thought I could perhaps hold some information meets for girls and tell them what kind of world is available to them. Tour some schools. It'd be some extra work of course so I dunno if I can actually do that, but it really would be nice if there could be some more girls picking up programming or engineering.

Thursday, October 2, 2014

Keeping at it

I don't have much to say right now, I got sick in the beginning of the week so I've mainly just been fibbing with my old stuff and started a little on my course examination project. But I thought I should post something here because... Days of nothing happening.

But my kittens survived the winter so I've got that thing going for me which is nice.