nemorathwald: (Default)
Any advice on a quick tool to preserve code formatting in a blog post?

The assignment. )

My solution. )
nemorathwald: (thoughts)
[livejournal.com profile] le_bebna_kamni knows Java really well, which has come in handy for tutoring, I can tell you.

However, she also has a copy of "Beginning Python From Novice To Professional" by Magnus Lie Hetland lying around. Since Python is the language I want to make actual real projects in, I was curious. So I decided to do my homework again, in Python. This time it was six lines long.

However, I decided to take it further. The new version properly uses singular and plural English. In other words, it will say "1 hour" instead of "1 hours."

My Python script. )
So while I was doing this, she also did the exercise in Python, except she didn't want to type the singlular/plural decision into her version three times like I did. She felt it was more elegant to make one set of pluralization instructions and have Python repeat it for hours, minutes, and seconds. She cursed at the computer for a half hour and came up with the version she will post in the comments.

I do not curse at the computer. I expect coding to be painful, and have been pleasantly surprised to be proven wrong.

pain = False

if not pain:
    gain = False

Java notes

Jan. 14th, 2009 04:56 pm
nemorathwald: (Default)
Halfway break in Java class. Read more... )
nemorathwald: (Default)
Over the holidays I started reading the textbook and creating flashcards in Supermemo on my handheld. These are the ones that were discussed in the first class. Let me know if you know a better way to put the questions, assuming that's your kind of thing.

Read more... )
nemorathwald: (Default)
I walked into the first class of Intro To Java and it was totally quiet. I sat down and the guy behind me asked me, "Hey, why do people learn Java?"

"What do you mean?"

"Like, why are you taking it?"

"To learn programming. It was that or take C++. Then I'll teach myself Ruby and Python."

"So, like Javascript? Javascript is a subset of Java?"

"No, they really shouldn't have named them alike."

"But Javascript's embedded in all the browsers."

"Yeah, it's like a monopoly so we have to put up with it."

"But Java ... what do people choose Java for?"

"The answer to that depends on as opposed to what."

"Like, what is Java good for?"

"The corporate world developed it so they trust it. Also it runs on different hardware platforms."

Now it has gone back to complete silence. The teacher hasn't started, so I'm blogging.

March 2025

S M T W T F S
      1
2345678
9101112131415
161718192021 22
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags