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

fire

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:

  1. Books ($5.00 each)
  2. Bookmarks ($1.00 each, or a pack of six for $5.00)
  3. Paintings of Books ($100.00 each)not
  4. Ask if another customer is waiting in line, and have the user enter an integer - 1 for yes and 2 for no.
  5. If no customers are waiting in line, exit the program.
  6. Show the customer a menu which has all items and their prices listed, as well as options to show the current order and check out. Customers should be able to modify their order (for example, if they accidentally enter that they want to purchase four books, then put one back, they should be able to modify that to three books).
  7. Showing the current order should show how many of each item the customer is going to purchase.
  8. Checking out will consist of showing a tabulated receipt with how many of each item was purchased. If an item was not purchased, it should not display (so there should be no “Books: 0 $0.00” lines. If the “Third Customer Discount” was applied, it should show that as a separate (before tax) line. It should include a subtotal (before tax), and then a total (after tax).
  9. Finally, ask the user to pay for it. The system should accept a floating-point number from the user. If it is less than the cost of the customer’s purchase, the system should print “Not enough money - please re-enter” and ask again. The system should continue to do this until a valid amount of money (the cost of the total or greater) is entered. Once a valid amount of money is entered, indicate the change given (for example, if the purchase is $96.50 and the customer gives $100.00, show that the change should be $3.50).

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…

IDEs. They’re Extraordinary.

IDEA

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

System.out.println();

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!

fire

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:

  1. Books ($5.00 each)
  2. Bookmarks ($1.00 each, or a pack of six for $5.00)
  3. Paintings of Books ($100.00 each)not
  4. Ask if another customer is waiting in line, and have the user enter an integer - 1 for yes and 2 for no.
  5. If no customers are waiting in line, exit the program.
  6. Show the customer a menu which has all items and their prices listed, as well as options to show the current order and check out. Customers should be able to modify their order (for example, if they accidentally enter that they want to purchase four books, then put one back, they should be able to modify that to three books).
  7. Showing the current order should show how many of each item the customer is going to purchase.
  8. Checking out will consist of showing a tabulated receipt with how many of each item was purchased. If an item was not purchased, it should not display (so there should be no “Books: 0 $0.00” lines. If the “Third Customer Discount” was applied, it should show that as a separate (before tax) line. It should include a subtotal (before tax), and then a total (after tax).
  9. Finally, ask the user to pay for it. The system should accept a floating-point number from the user. If it is less than the cost of the customer’s purchase, the system should print “Not enough money - please re-enter” and ask again. The system should continue to do this until a valid amount of money (the cost of the total or greater) is entered. Once a valid amount of money is entered, indicate the change given (for example, if the purchase is $96.50 and the customer gives $100.00, show that the change should be $3.50).

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…

IDEs. They’re Extraordinary.

IDEA

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

System.out.println();

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.

Subscribe to Tiffany R. White Blog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe