Thrown Into the Fire, or, The Blank IDE in CS 0401

Tiffany White,

First let me say, the class with Licence to Bill, my professor, kills it every class. Seriously. If you’re a Pitt student and haven’t taken him, do it. Like now. And get yourself an IDE. More on that later.

We are moving along quickly right now. I am not even sure if we are doing Java I/O as I missed a class but whatever. Our first assignment was like a slap in the face to me last night after being out in the snow and cold for three hours waiting for the bus. I was exhausted and the instructions looked like gibberish.

So I started on it today. Here are the instructions:

We will assume that you are operating the bookstore in Oakland, so you will need to add 7% additional tax (Pennsylvania and Allegheny County taxes) on all sales. For example, if somebody buys one book at $5.00, then the total cost should be $5.00 + $0.35 in tax, or $5.35.

All values should be rounded to the nearest cent.

Additionally, in order to attract business, you are running a promotion: every third customer will get 10% off their order (before tax). This will start with the third customer; the first customer will not get a discount, the second customer will not get a discount, but the third one, sixth one, ninth one, etc. will. For example, if the third customer buys a book, they would get $0.50 off (10% of $5.00), for a total of $4.50, and then tax would be added ($4.185, which would be rounded to $4.82).

If the customer does not get a discount, then along with the receipt, the message “You did not get a discount! Better luck next time!” If the customer does get a discount, display the discount amount and the message “You won a 10% discount!”

You will write a Java program that runs a point-of-sale service for your bookstore. The program should do the following:

I sat down at the IDE. My mind drew a blank. I had to look at examples and old snippets in SnippetsLab to get a sense of syntax. This makes no sense to me as I was tweaking code just last week. ¯(ツ)

Anyway, I got it rolling. Bill’s code samples gave me a jumpstart and I have a working loop. I can’t really share too much code here as we have mandatory private GitHub repositories to work in but I will share a screenshot of my IDE, which brings me to my next point…

In the last post, I mentioned getting a screenshot of IntelliJ IDEA from a guy in Slack. I tried to get it working but still couldn’t get it to debug. I did some GoogleFu and found out that I didn’t have the root directory specified and how to set up a module configuration. I then did this for WebStorm, where I do my JavaScript coding and am off to the races. Even my theme works now.

I seriously underestimated the power of the IDE. Of course, it is a tool like anything else and can be used as a crutch instead of a learning tool. But I know about

I just think it’s far more efficient to get the runtime and compile errors without muddying up my code with a bunch of println statements. Setting breakpoints solves that issue.

Bill doesn’t want those .idea folders or .iml files so I added them to my gitignore file and none of those were upload to the repository. Use your gitignore files, friends!

First let me say, the class with Licence to Bill, my professor, kills it every class. Seriously. If you’re a Pitt student and haven’t taken him, do it. Like now. And get yourself an IDE. More on that later.

We are moving along quickly right now. I am not even sure if we are doing Java I/O as I missed a class but whatever. Our first assignment was like a slap in the face to me last night after being out in the snow and cold for three hours waiting for the bus. I was exhausted and the instructions looked like gibberish.

So I started on it today. Here are the instructions:

We will assume that you are operating the bookstore in Oakland, so you will need to add 7% additional tax (Pennsylvania and Allegheny County taxes) on all sales. For example, if somebody buys one book at $5.00, then the total cost should be $5.00 + $0.35 in tax, or $5.35.

All values should be rounded to the nearest cent.

Additionally, in order to attract business, you are running a promotion: every third customer will get 10% off their order (before tax). This will start with the third customer; the first customer will not get a discount, the second customer will not get a discount, but the third one, sixth one, ninth one, etc. will. For example, if the third customer buys a book, they would get $0.50 off (10% of $5.00), for a total of $4.50, and then tax would be added ($4.185, which would be rounded to $4.82).

If the customer does not get a discount, then along with the receipt, the message “You did not get a discount! Better luck next time!” If the customer does get a discount, display the discount amount and the message “You won a 10% discount!”

You will write a Java program that runs a point-of-sale service for your bookstore. The program should do the following:

I sat down at the IDE. My mind drew a blank. I had to look at examples and old snippets in SnippetsLab to get a sense of syntax. This makes no sense to me as I was tweaking code just last week. ¯(ツ)

Anyway, I got it rolling. Bill’s code samples gave me a jumpstart and I have a working loop. I can’t really share too much code here as we have mandatory private GitHub repositories to work in but I will share a screenshot of my IDE, which brings me to my next point…

In the last post, I mentioned getting a screenshot of IntelliJ IDEA from a guy in Slack. I tried to get it working but still couldn’t get it to debug. I did some GoogleFu and found out that I didn’t have the root directory specified and how to set up a module configuration. I then did this for WebStorm, where I do my JavaScript coding and am off to the races. Even my theme works now.

I seriously underestimated the power of the IDE. Of course, it is a tool like anything else and can be used as a crutch instead of a learning tool. But I know about

I just think it’s far more efficient to get the runtime and compile errors without muddying up my code with a bunch of println statements. Setting breakpoints solves that issue.

Bill doesn’t want those .idea folders or .iml files so I added them to my gitignore file and none of those were upload to the repository. Use your gitignore files, friends!

I have a lot of respect for the text editors I’ve worked in and I probably will stick with VS Code and the plethora of excellent JavaScript tooling modules out there for writing JavaScript heavy apps, no offense to WebStorm. But for code that doesn’t have the tooling JavaScript has, I will stick with IDEs like IntelliJ and RubyMine.

© tiff.RSS