Week 26 – OOP

Weekly Learning

This week we continue learning Java. Again, it’s a week were I’m trying to battle between what I am familiar with (weakly typed languages), and what we’re learning. I really like the immediate feedback of typed and compiled languages, and it’s something I had seriously forgotten about. There are small details on the implementation that make it frustrating at time: For instance, the fact that '' signifies a character while "" signifies a string. They’re minor inconveniences for the predictability and structure that typed and compile languages offer.

I also have to work on some of the older habits that I’ve acquired. For instance, throwing outputs around all over the code. On web development this is normally ok since they go to a logger, and they serve as checks in the code itself rather than for the consumer or costumer. But in a console driven program, or an application that requires the program to communicate with the user, the placement of the output, and the structure around is actually very important. These are good habits to learn and keep.

I have used a lot of OOP in the past. It really makes up most of my experience. Functional programming is portion big enough to understand and appreciate the different paradigm. I have always liked OOP, though I think functional does solve a lot of interesting problems in a more efficient way. However, it seems to start getting overly complicated when solving large issues, where objects can maintain a simple structure that can be extended. OOP is popular because it’s both flexible, accessible and efficient at solving problems. I’ve found working with both, that code in OOP is often more readable, and while there maybe a bigger mental overhead per function, there is a lost less for the program as a whole since objects and their structure can often be blackboxed.

On the other hand, UML has always been difficult for me. I can draw simple diagrams, but I have always felt unsure on how to properly break down the structures and how each step should be represented or the depth and detail of the diagram. I think I did a decent job for my video, but I personally would like at least a small workshop on that specific topic. I feel they’re incredibly tools that when done properly can convey the entire message with little to no mental overhead. But they’re also rarely used properly.

I hope we get to work a bit more with those tools. Part of having a proper program in place is to have technical documents behind it. Writing that sort of documentation is a skill all on its own and its something schools should also work to teach students.

Posted in CST-338, CSUMB | Comments Off on Week 26 – OOP

Week 25 – Software Design

Weekly Learnings

This is my first time with I’ve used eclipse. From my brief exposure to Java, I realize this is a very popular both IDE and language. I’m more use to thinner IDE’s such as sublime Text or Atom. That is also a function of the languages I have worked with in the past. My professional experience is mostly as a web developer. I’ve worked with Ruby, Elixir, PHP and a little of NodeJS. One thing all those languages have in common is that they’re not strongly typed. Getting back into typed and compiled languages is a bit strange. I haven’t really worked with them since college a while back. It’s been a little bit of a challenge to get back into it. It has also been a lot of fun to read about the language, and enjoy some of the very nice things a fully compiled language can support such as error checking, type checking, etc. I also see learning Java as a fundamental step on computer science. There is a reason why the language is so popular and has been for such a long time. It’s a powerful and portable language, and even learning the basics can give you a strong basis to become a better programmer. I think by interest remains so far in the web side of things. I like the interactions between users, clients and servers, and the possibilities that the web brings. However, I know we’ll be exploring a little bit of the Android suite, and that is very exciting for me. I have never worked on a mobile application directly. Only on the backend. So the getting to play with a client and make something interesting is an opportunity that I don’t want to pass up. I’ve also not had formal training on a lot of a design patterns. Most of my training and experience has been just through professional need, and while that is a great experience, having formal training is very valuable. I’m very much looking forward to this class, learning patterns for better software design, and improving both professionally and academically!
Posted in CST-338, CSUMB | Comments Off on Week 25 – Software Design

Week 24 – Database Final Learnings

Weekly Learnings

This is the final week for the class. There are a few things that I wish we had worked more on. Systems like Hadoop, MongoDB and Cassandra would have been very interesting to explore and valuable in today’s programing environment. I understand we are working on a tight timeline, and therefore we have to pick the most important topics.

We covered very interesting and useful topics, and I can say with a confidence that this class has been of great value to me. Demystifying mysql, learning complex queries, aggregations and design are skills that I can translate into my job almost immediately. Understanding indexes or b-trees are good tools in the kit, but don’t necessarily have a practical use for day-to-day operations.

I had hoped that we could dig a bit deeper into map-shuffle-reduce since it’s the base strategy for clusters like Hadoop. So I was a little disappointed that we only touched the surface. But at least it provides a basic foundation to start doing a bit more digging on my own. It also exposed me to a few interesting patterns of design such as decorators and how they can be leverage instead of the more common inheritance pattern so often associated with OOP.

It’s been a great class to take!

Posted in CST-363, CSUMB | Comments Off on Week 24 – Database Final Learnings

Week 22 – Transactions and Locks

Weekly Learning

Interesting week going over transaction and locks. All very new material for me, and I’ve had to read and reread some of it to make sure I’m actually understanding it. The assignment itself wasn’t that hard, but there were both typos and inconsistencies that  make it difficult to get through it. Of all the weeks,  and all the assignments, this has been the most taxing one because of that.

Transactions and locks, and MVCC are subjects I had never studied, or worked with. I’m glad those are solved problems, and that the only part I need to worry about is when/how they should be used which is already hard on its own. They’re not particularly interesting, but I understand why they’re needed. The relevance of keeping data consistent across reads and write.

Understanding that was perhaps the best part of the assignment. Creating the transaction and rollback mechanisms was fun, despite the different setbacks with the unclear assignment. Still, I do think that as much as I’ve learned to like databases and try to understand how they work, DBA work is just not that interesting to me. Mostly because of this type of issues. As developer, I’ll need to learn why this things work the way they do, and how to leverage them on my code. But I would not want to sit down and solve for this sort of optimization or problem in a daily basis.

Still, I’m happy I’ve learned about it. I think transactions, locks, concurrency are very important subjects. Understanding the trade-offs and the performance implications that go along with it are essential for software development, specially in today’s world when the programs we write demand to be both fast, and accurate. ACID as a paradigm is becoming too important to dismiss or gloss over.

Posted in CST-363, CSUMB | Comments Off on Week 22 – Transactions and Locks

Week 21 – Indexes and B-Trees

Weekly Learning

This week we took a fairly deep dive into indexing, the strategies behind it, and the advantages and disadvantages of each. This is by far the densest topic that we’ve covered so far. Again, I have to refer back to my personal experience dealing with databases. I’ve often been called out by DBA for either adding too many, not enough or simply for querying indexes in a not proper way. It certainly makes sense now why indexes are effective, but also why keeping them can be expensive. You index in excess and you’re essentially killing your disk space with data you simply cannot use. Not enough, and you  will be hitting the database for a scan of data you need.  But then, while reading becomes trivial with indexes, writing can be expensive, having to balance b-trees, or update sparse tables.

So what is the right solution? The reality is that you still need to solve the main problem of locating data fast in the database. So the trade-off of each approach mainly depend on the type of data, and the quantity to write. Sparse index over large amounts of data that can be spread over several sectors is a great choice, while for systems with little writes just having pointers on an ordered linked list can be an easy solution that is very effective.

Of all topics so far, this has been one that took me a while to click. The video was perhaps the best addition. Having a clear explanation of the context of b-trees and b+-trees was essential for success, and while the reading was good to get an idea of what is needed, ultimately having a voice tell you how it all works, was the best approach for me.

Posted in CST-363, CSUMB | Comments Off on Week 21 – Indexes and B-Trees