Ngoc-Huong's profileHuong's spacePhotosBlogListsMore ![]() | Help |
|
Huong's spaceJuly 01 The Alienist Book ReviewI actually first heard of the Alienist when it first came out. I think it was a favorable book review in Time magazine or something. Never got around to picking it up, not a huge fan of mysteries, but somehow the name of the book stuck with me. The cover of the book did as well, it was so foreboding it just seemed to etch itself indelibly in my memory. So fast forward to 2008, I’m at Fools’ Cap 2008 and they have a magnificently large collection of free books. One of these books is the Alienist. I snatched the book and being thoroughly burned out on life, decided to take these past few days to work my way through it. SPOILERS I liked it. It’s a book that definitely fits into the Sherlock Holmes mould, but with a distinctly historical take on things. I would have to say that is one of the most memorable things about the book, it has a very real sense of place and time. Turn of the century New York City. I’m sure if you looked up all the famous people and places they would all check out. But there is no sense of urgency to do so. The authenticity is evident as one reads and that feeling is only reinforced the further one goes into the story. The story itself is a little lacking in passion, and perhaps in 1994 was more shocking, but after the critical and popular success of Silence of the Lambs and the embedding of Hannibal Lector into the collective consciousness, the story revolving around serials killers loses its punch. It would have helped if the characters in the book had more gusto, but while not irritating, I didn’t feel any particular attachment to them. Dr. Kreizler in particular seemed to lack real depth. He has some weaknesses thrown in to make him appear less of the superman than he is, but they ring false. This is a man of great powers who may only really be foiled by himself. Much more time could have been given to Sara and her relationship with Moore, but she also ends up being a stock “strong woman” character with little depth. The two brothers thankfully do not become Jewish mockeries, but are not given a lot to do. The biggest misstep in the book is the secondary plot involving the police, the church, and J.P. Morgan( ?!!? ). It really has no bearing on the plot, and while proving an apt red herring in the 1st half of the book, the reveal is COMPLETELY wasted. I can’t say it any other way, it was a real letdown to find out what was actually going on. I suppose it was done to prevent the book from being a “straight” serial killer story, but it seems like there could have been much more done with it rather than just throwing it away. Also, after this the “surprise” about the serial killers youth being bad, and having a cold, heartless mother etc etc was almost an anti-climax. Overall, a thumbs up, with reservations for people with weak stomachs ( the murder victims are described in graphic detail ). June 22 Jefferson’s Pillow Book ReviewMy beloved (ex) fiancé Stacy at the time was travelling to Washington D.C. for some fun. On her way there, she just happened to sit next to a very distinguished gentleman who helped her kill some of the flight time by flying. It turns out this was none other than THE Roger Wilkins! She was thoroughly impressed and purchased Jefferson’s Pillow as a way to honor and remember that meeting. It has been in my care since then, and before returning it to her, I decided to read it. This book review isn’t going to focus on whether the book is good or historically accurate ( it’s good and as much as I know it is accurate are the answers to those questions ), but rather its going to focus on what I felt and thought while reading. A short summary of the book itself is that it starts and ends in the present, delving into the past in between these 2 bookends to find the answers that the author is seeking. The idea that the founding father’s could condone or even benefit from slavery whilst fighting it tooth and nail is an idea that is not thoroughly explored in our historical education. I think it’s a shame, because this book touches on many insights as to how that tension went on to form this nations character in ways that are still felt today. The title itself is something of a dramatic reveal as Roger tells the reader that even as a baby, Thomas Jefferson carried on a pillow borne by a black slave. It is a powerful image, and a metaphor for the often unseen and unrecognized benefit all Americans ( but especially those early Americans and in particular our Founding fathers ) received from the use of slaves from the beginning of the nation. It shook me for a moment when I read those words: Our Founding Fathers were shaped and molded by the use of slaves for both good and ill. It was the use of slaves that permitted them time to study and internalize the ideas of freedom and politics. So on one hand we condemn their acceptance of slavery, but on the other, it is highly likely that without slaves supporting them, our Founding fathers may never have been. In a book chocked full of ideas, I think this is one of the most powerful. It recognizes that George Washington, George Mason, Thomas Jefferson, John Adams and all the rest of those great men were strongly influenced by the culture and norms of those times, just as we are in our time. To me, the other thing that really stuck with me about this book is the strong sense of patriotism that book is meant to engender. It is a mediation on the idea of patriotism in the face of continued racism and bigotry in this country. The author points out these issues but firmly points out he is definitely an American. An excellent point he makes isn’t whether one sees ones’ self as an American, but how do others see us? More specifically, how would your country of ethnic origin see you? Roger answers that question by relating his experience going back to Africa. He notes that standing on the street corner, he was so indelibly marked as an American, that a random white lady came up to him and struck up a conversation with him about what state he came from. The experience resonated with me as I had a nearly identical feeling when I went back to Vietnam. Even if I were to lose weight, dress shabbier, and do whatever else it took to fit in, somehow I felt unrecognizably American. It was in the way I walked, the way I moved through the crowd, and even the way I stood. I think it takes an experience like that to show how much of an American you really are. It is a common feeling these days to feel somewhat alienated from America. It is such a large stew of different opinions and thoughts that it is hard to feel part of the larger whole. That is why I really liked this book. It tackles that feeling in a way that is specific enough to be thoughtful and provoking a strong reaction with clear examples, yet broad enough for anyone to enjoy reading it. Highly recommended. June 16 Channel Master CM7000 Digital Converter Box quick takeI recently ordered 2 of these devices just in case I needed them for the analog to digital switch. I don’t have any TV’s using antennae but I figured it didn’t hurt to have them, and hey, the government was handing out coupon vouchers for them. The coupon vouchers look just like credit cards, and you can use them both in person and online. The included paperwork doesn’t really explain it like that, but they are essentially gift cards/credit cards pre-charged with $40. Super easy, the only thing you have to remember is to use them before they expire. The date is pretty short, so if you got em, use em. I ended up picked the Channel Master because it was pretty much the best convertor for the price. There was loads of reviews on the web and Consumer’s Report did a pretty extensive comparison review. I only looked at ones with the best picture quality. On the review, it has a list price of $80, but it can be found cheaper online. I took a quick drive over to Fry’s, but they had it for $70 and I didn’t want to spend $60 ($30 x 2) for them. I bought mine from Solid Signal who had them for just a hair over $40. The shipping was pretty outrageous at $12 ( And they didn’t even box the damn things!!! They just taped them together! ), but I only paid a hair under $17 for both of them. Unfortunately, I was hoping to test the features and picture quality more thoroughly, but the boxes themselves cannot process a cable signal. They ONLY process over the air, so unless I wanted to bust out a pair of bunny ears, it was hopeless. I checked out the guide a bit, and while the picture seemed a little fuzzier with it, I was doing double co-axial cable which was gonna put the hurt on my signal quality anyway. The guide seemed adequate, I’d say my main gripe was that it was pretty obtuse how to navigate around. I scanned the entire channel gamut but nothing popped up. Overall I was pretty satisfied though. The packaging came with a pair of AAA batteries and also a very small section of co-axial cable to help you out to hook up the TV. I loaned the other one to my sister, so when she gets it hooked up, I may update this quick take. So if you’re in the market, I digged the Channel Master. Of course, the better option is to get a new TV! You’ll save space and draw quite a bit less power. Sure sure cathode ray tubes have their benefits, but not for TV. Get with the future people! :) May 28 Letting go is hard to doMy mom just smashed all my wine bottles and attacked me with a knife, then a pair of scissors. And my fiancé and I are taking a break. Who knows what will come? Life goes on. May 09 Designing and implementing a Simpletron using C#The last problem in Chapter 8 of Deitel’s Visual C# 2005: How to Program 2/e is to design and implement a simple machine-language processor called a Simpletron. I won’t go into the basics of the machine in great detail, since the book does so at great length. It is a really interesting problem, but there isn’t a great deal of information regarding C# implementations on the web, so hopefully this post will serve to fill part of that void. There are 2 parts to the problem: 1) Implement the Simpletron class in an extensible manner – This teaches you how to use Arrays in yet another way. Essentially in this problem, the Arrays are used both as RAM ( memory ) and as registers to hold changing values. 2) Enhance the Simpletron by adding the capability to perform additional operations – This portion of the problem forces the student to understand the nuances of low-level CPU operation. I’ll only be posting code for part 1. Since this problem is often used in academic settings, I won’t be posting the other code, but what I’ll do instead is post errata I’ve found in the advanced problem, and my own interpretations of the enhancement requests. I found the wording in the book to be quite vague regarding how far to go with the modifications, so I hope this proves helpful. I searched fruitlessly for many hours with finding anything, so maybe someone else will be spared my pain. :) Code outline for the Simpletron: namespace Exercise8._32 { class Simpletron { // Input/output operations private const int READ = 10; private const int WRITE = 11; // Load/store operations private const int LOAD = 20; private const int STORE = 21; // Arithmetic operations private const int ADD = 30; private const int SUBTRACT = 31; private const int DIVIDE = 32; private const int MULTIPLY = 33; // Transfer of control operations private const int BRANCH = 40; private const int BRANCHNEG = 41; private const int BRANCHZERO = 42; private const int HALT = 43; private const int SIZE_OF_MEMORY = 100; private const int MIN_MEMORY_RANGE = -9999; private const int MAX_MEMORY_RANGE = +9999; private const int STOP_PROGRAM = -99999; private int accumulator; private int instructionCounter; private int operationCode; private int operand; private int instructionRegister; private int[] memory; public Simpletron() { memory = new int[SIZE_OF_MEMORY]; accumulator = 0; instructionCounter = 0; operationCode = 0; operand = 0; instructionRegister = 0; } public void Run() { DisplayWelcomeMessage(); UserDialogue(); ExecuteProgram(); DisplayMemoryDump(); } private void DisplayWelcomeMessage() { } private void DisplayMemoryDump() { } private void UserDialogue() { } private int ValidateUserInput(int currentUserInput) { } private void ExecuteProgram() { } private int EvaluateOperationCode(int currentOperationCode, int currentOperand) { } private int AccumulatorOverflowValidation(int currentOperationResult) { } } } You can see that I have a Run method that is the primary execution method inside the class. There are also various validation methods that are called inside of some of the major methods. This code could have been placed inside of the main methods, but since it is called by many times, I thought it was wise to separate this code out. I would like to say that the particulars of the implementation aren’t super important – in this part of the problem, the main issue is the design. Another important thing to remember is to consistently use Test Driven Development. After each piece of code was created, I would run a few programs stressing those functions to ensure that the program was working correctly. It’s important that you test at least 3-4 variations of data to make sure that you are not designing only for a subset of your data. I could have automated the testing by creating an overload of the run method that bypassed the userinput method, but for the scale of this project, performing the testing manually wasn’t time intensive. I would like to stress that had we wanted to continue modifying the program, we would have wanted to create automation at that point. Okay, part 2 – the advanced section. I’d like to point out an errata on page 407: “In Exercises 25.10 and 25.11, we propose building a compiler that converts programs written in a high-level programming language (a variation of Basic) to Simpletron Machine Language. Some of the following modifications and enhancements may be required to execute the programs produced by the compiler: “ Well, I looked these problems up hoping for some clarification, but they don’t exist. :) I believe requests a), b), c), and e) to be pretty self-explanatory. Below is some additional information that I believe will help with the remaining modifications. d) Modify the simulator to use hexadecimal values rather than integer values to represent SML instructions – This modification is kind of weird, because if you followed the book, you almost certainly used an integer Array as your memory structure. It’s also kind of redundant to ask us to store things as Hex, since the computer is doing that anyway, but to shoehorn hex into your existing memory array would be a nightmare. And to what end? So I ended up interpreting this request to mean that on output, you should display all memory registers as Hex. I also added a section to the beginning asking the user which format: Decimal or Hex they would prefer. I know for troubleshooting I wanted Decimal since that is how I wrote the programs! f) Modify the simulator to process floating-point values in addition to integer values – This one is a doozy. There are 2 possible ways to interpret this – Add a double memory array, accumulator, and a whole new set of instructions. The other is to continue to use integer memory and registers and instead encode the floating point data to fit within an integer field. I used the latter interpretation, since the former is kind of cheesy. One point in favor of the latter is that it will teach you an important lesson about CPU’s. Hint: Up until Intel’s 386 DX processors, all CPUs only had a single accumulator register. I really enjoyed this modification. g) and h) Modify the simulator to handle string input – The only thing I need to mention is pay attention to this sentence in the clue the book gives you: Each two-digit integer represents the ASCII decimal equivalent of a character. That is the most important sentence in the clue. If you look up an ASCII table, you’ll see that they all have decimal representations, but that there are some with more than 2 digit representations. For instance, “h” or lower case h, is 104, so it’s impossible to fit into a 2 decimal bit memory location. If you did part f as I did, this problem might be easier for you, since similar thinking ( i.e. encoding/shifting ) is required. Hope this helps! I had loads of fun solving this problem, and I hope that these hints help you focus on the important parts of the problem. |
|
|||||||||||||||
|
|