Category Archives: CS-343

Demystifying REST for myself

To preface this post I would like to say that this is the last blog post I will be writing for a little bit. I hope to return to this blog with a new outlook on the process of writing blogs and hopefully with more freedom in what I can post, the frequency and quality of posts will increase. In this post I have decided to do some research on REST in order to fully understand it so that going forth in my career I have a firm grasp on REST. Before reading this extensive article on bbvaopen4u.com about REST pretty much all I knew is that REST deals with http requests and http stuff.

First thing I learned when reading the post was that REST is more of a blanket term for any interface between systems that allows for the transfer and editing of data over multiple formats. This idea is so important because it vastly increases the scalability and functionality of products being created. It has become the standard in creating web applications and is used by most of the top sites such as YouTube, Twitter, and Facebook. The writer then goes into detail about the features that make REST special and why we all love it. A great feature of rest is the fact that everything is manipulated through the URL, keeping applications very uniform in how they access objects. They also talk about how it is a layered system which helps organize large applications. They then go into the benefits of using REST. Using REST separates the clients and the server which allows for scalability and ease of migration to other platforms. REST is also always independent of type of language being used which also increases options for migration and ease of development.

I enjoyed this read and while I feel as though it could have delved a little deeper into what REST is it was a quick easy read that helped me understand REST. Using REST in our assignments and project I had been emulating what I had seen without truly understanding what REST was. If you are like me and was having trouble grasping the concept of REST I would recommend reading this post.

From the blog CS@Worcester – Dummies for Programming by John Pacheco and used with permission of the author. All other rights reserved by the author.

Music Composition and Programming are More Similar Than We Think

I consider myself a predominantly creative person as opposed to someone who thinks in a very mathematical and literal way. Most people would probably argue that I should be going to school for something along the lines of art or music but I’d argue that programming requires the same amount of creative prowess as both of those majors.

A user on DevDungeon wrote a post about this topic called Similarities Between Music and Programming. This article goes into detail about how the learning process in both music and programming is very similar. They talk about how most people feel like music and programming similarly are things that you are born with a natural gift for and can be difficult to learn. With music there is very much a mathematical science behind the music which can almost always be explained using the concepts learned through music theory. In music there are very many ways to get a similar result and all musicians will think of songs and have vastly different musical ideas. The same could be said for programmers. Many programmers can come up with vastly different solutions to the same problem based on how their brain solves the problem at hand. They also talk about how there is a hypothetical “stage fright” that occurs when just starting out in both fields. New musicians and programmers usually don’t want to share their work because it is very much an extension of yourself and if it is not up to your own standards it is hard to want to share what you’ve made. You can think of collaborating on a program with others as a band of sorts. If all members of the band aren’t on the same page then the outcome will most likely have many issues. They then go on to talk about how music and programming are very hands on and from day one should be taught in a hands on way.

I agree with almost everything said in this post. It was a very enlightening read because I have always taking a liking to the creative arts and seeing the similarities now it makes sense as to why I enjoy programming so much as well. I’d argue that programmers should learn music composition as it would help with the fundamentals of problem solving that are essential for programmers.

From the blog CS@Worcester – Dummies for Programming by John Pacheco and used with permission of the author. All other rights reserved by the author.

Accessibility in VR: The hurdles we have to overcome

It’s no surprise to anyone how huge VR has gotten as an industry and a viral topic in everyday life. While Virtual Reality has been around for many years on recently have companies like Oculus and HTC brought it to the forefront of tech news. With the newest advancement in the industry it is very reasonable for anyone to be able to afford a headset and experience new worlds from the comfort of their own homes. The applications for VR don’t stop at entertainment either, VR can be used for medical procedures, physical, and mental therapy and much more. While this has been the push that VR needed for many years there is a large group of people who sometimes miss out on all of the VR experiences being crafted, those with disabilities. In Thoughts on Accessibility Issues With VR on ablegamers.org, AJ Ryan goes over some ways developers can start the conversation about what measures they should go to to make games accessible. The most alienating feeling is when you are barred from experiences because of a disability and while VR can be a very physical activity there are many ways to increase accessibility.

This Blog post is set up in a list format where each element is another things that developers should be trying to do better in order to accommodate those with disabilities. The first point is that motion controls are cool yet there should always be an option to play with a controller. Another point made is that games shouldn’t require you to stand up in order to play them. Something that is extremely easy to implement yet many developers don’t is full button remapping. This would allow people who use adaptive controllers while playing VR to comfortably experience the games we are developing. These ideas pretty much sum up the overarching theme of the list and that is “when developing games add as many ways to control the game as possible while not barring of ways of playing such as standing/sitting”. If developers spent more time thinking about those who are playing the games and not the game itself it would create a much more inclusive library of games. This article is an essential read for all developers because if developing for accessibility hasn’t crossed your mind you are missing out on a huge subset of people who most likely would love to play the games you are making yet can’t.

From the blog CS@Worcester – Dummies for Programming by John Pacheco and used with permission of the author. All other rights reserved by the author.

Deep Learning AI Programmers Have Come to Take Our Jobs!

From the minds at Rice University comes a very interesting application for deep-learning AI. Bayou is an AI that, with a very small list of keywords, can produce usable blocks of code. It does this by scanning github and learning from all of the open source code on there. What does this mean for all of us computer scientists? This means that an era where AI may be able to aid us in completion of programs is on the way. For a long time this concept has been played with but never in such an efficient manner as Bayou. With other AI programmers sometimes the parameters you would have to enter to get a usable end product would surpass the program itself in length and complexity. While my title is very clickbaity I can guarantee that our jobs are safe for a very long time. This technology is only in infancy and for large programs that interact with many APIs and databases and such the need for a human to parse what needs to be written is still very essential. Bayou is more of a proof of concept that if built out even further can be very useful for speeding up the programming process.

In the post Turning deep-learning AI loose on software development, Jade Boyd makes many fair points about the ethics of Bayou. As programmers being so connected to the internet constantly has made it almost impossible to write programs from scratch. At any slight hitch we are able to search the internet and find someone else’s solution to a problem that we are facing. This point really proves that Bayou shouldn’t be seen as “cheating” rather that it is yet another tool that can give us examples of ways to solve specific problems that we maybe would have otherwise not given thought to.

I believe that applications such as Bayou are a step in the right direction. If we can get AI to write all of the simple parts of programs it would guarantee less simple errors and can also unify the format of the program. Programs can get extremely complex and Bayou wouldn’t replace us rather aid in saving us time and therefore money in the programming process.

From the blog CS@Worcester – Dummies for Programming by John Pacheco and used with permission of the author. All other rights reserved by the author.

Santa Uses Java?

https://dzone.com/articles/whos-been-naughty-whos-been-nice-santa-gives-you-j

 

Since Christmas was just past I was wondering how Santa could handle so much data so quickly. This blog post seems to suggest that through the use of Java and Speedment is how he accesses this database of children and presents. Speedment is a software tool for enterprises that run Java applications and relational databases. It works by creating a virtual data object, retrieving only the data the application needs when it needs it. What it does is reduces the amount of develop time, increases data access, and builds a better infrastructure. How would Santa use Speedment though? Well he would implement Speedment into java code and call on his database of children in order to gather the information he needed.

An Example:

. var niceChildren = children.stream()

. filter(Child.NICE.isTrue())

. sorted(Child.COUNTRY.comparator())

. collect(Collectors.toList());

 

This stream will yield a long list containing only the kids that have been nice. To enable Santa to optimize his delivery route, the list is sorted by country of residence. What is exciting about a Java application like this is you can create code that easily checks on a database. I had created a SQLite program earlier in the year and the way the code was built felt clunky. In the case of Speedment you can do this process smoother. In terms of software development when looking into database access Speedment seems like a valuable tool to implement. Their website has a code generator for different databases, and languages to make sure you can quickly implement it in any program. I believe this is truly how Santa is able to access his list so quickly to make sure he can check it twice.

From the blog CS@Worcester – Computing Finn by computingfinn and used with permission of the author. All other rights reserved by the author.

AI at Google: our principles

This is the blog call “AI at Google: our principles” by Sundar Pichai, he is Chief Executive Officer of Google. In this blog he talked about the principles of AI at Google. The main purpose of AI is to help us, its potential to improve our lives. Beyond that, AI to help people tackle urgent problems. These benefits are why Google invests heavily in AI research and development and makes AI technologies widely available to others via our tools and open-source code. This is powerful tool that mean we must be responsibility to get this right. These are seven principles to guide Google’s work going forward. They want to set to concrete standards that will actively govern the research, product development and business decisions.

Objectives for AI applications: Advances in AI will have trans formative impacts in a wide range of fields, including healthcare, security, energy, transportation, manufacturing, and entertainment. They also take into account a broad range of social and economic factors and will proceed where they believe that the overall likely benefits substantially exceed the foreseeable risks and downsides. They recognize that distinguishing fair from unfair biases is not always simple, differs across cultures and societies. They will seek to avoid creating or reinforcing unfair bias. They will continue to develop and apply strong safety and security practices to avoid unintended results that create risks of harm, and will incorporate our privacy principles in the development and use of AI technologies. AI tools have the potential to unlock new realms of scientific research and knowledge in critical domains like biology, chemistry, medicine, and environmental sciences. They aspire to high standards of scientific excellence as we work to progress AI development.

And the applications that they will not design AI for, such as weapons or other technologies whose principal purpose or implementation is to cause or directly facilitate injury to people. Technologies that cause or are likely to cause overall harm or gather or use information for surveillance violating internationally accepted norms.

Look at AI for long term, this is the technology that will stay with us in the future. There are many voices about this subject. Although I don’t have all my trust and believe in company and operation. This is the future we cannot avoid, that’s mean we have to be careful and monitor it to goes right direction. We need to set regulations and principles, I am agreed with these principles by Google. But we need to make sure that they keep their words.

From the blog CS@Worcester – Nhat's Blog by Nhat Truong Le and used with permission of the author. All other rights reserved by the author.

Documentation is important

Self-documenting code is one of the biggest myth in the software development industry. It is common for someone to think that their code is pretty much self-explanatory, either because it is so simple or they are the author so they should have known it better than anybody else. However, not all of us can realize the fact that while the code is pretty transparent for ourselves, other would not have the aspect as we do despite how much experienced they are in the field. In this blog post, I would like to reason that code comments have a lot of value and documentation has more value than just explaining how functions / software works.

From that all of us can understand, code documentation is basically a collection of descriptions to explain what the codebase does and how it can be used. It can be a simple explanatory comment that locates above a function or a block of code, or a full fledged developer handbook, usually complete with prescriptive style dos and don’ts overviews of each part of the application, and approaches to the most common types of coding task. Like a lot of people would think, the general reasons why we think our code is “self-documenting” mainly because our applications can be boiled down into functions or objects that have one specific task and that task should be represented by the name of the functions or the objects and for me, this is not true at all, especially with large project with lengthy codes and potentially has functions that is named a little bit similar and have some common traits with each other. What we mostly don’t really think about is that code without comments is basically force the reader to go through the how it is implemented to figure out the why. With that being said, we can see that documentation are important to transfer the knowledge of what that function really do so that people can reuse it by just not knowing how it was implemented and that is fine. Not just giving user the instruction, code comments are also used to provide example usage of the code, provide the trade offs or pros and cons of the current implementation, marking the possible improvements in the code, possibly how to use it effectively with others APIs, and it serves as the most effective communication between authors and readers.

Another flaw of self-documenting code mindset that we usually think is that because we are standing in the developer-only point of view. To be clearer, what I meant is that we only seeing the value of documentation as allowing people to understand how the code works and documentation should be for every possible user. Developers only think about developers when it comes to software. It is true that a vast majority of the software users are end users and by having a good documentation can make the software more approachable by users that are not developers.

Article reference can be found here.

From the blog #Khoa'sCSBlog by and used with permission of the author. All other rights reserved by the author.

Uh Oh! Spaghetti Code!

Hello, once again my fellow readers! I am sorry to report that this will be my last blog post for this semester and in turn this class. Continuing with my trend of Antipatterns today I will talk about a delicious Antipattern, Spaghetti Code.

SPaghetti code is the Antipattern that everyone first falls into when learning how to code a new language, learning a new coding tool, or learning how to code in general. Spaghetti code is the Antipattern representing code that has very little software structure. As a result, this leaves the code with a lack of clarity or direction, even to the original developer. This is the classic moment where you uncover code from some time ago, sit down, look at it, and go, “What was I even trying to do here?”

It can be quite easy to identify Spaghetti Code. Simply look for methods being very process oriented. Object implementation will also dictate flox execution. You will see minimal relationships between objects. You will see a very predictable pattern of object use.

Spaghetti Code can result in many consequences. Spaghetti code results in a program with diminishing returns. If Spaghetti code is mined, only part of the code will even be suitable for reusable if any of the code is reusable at all. As well, maintaining the code will result in being much more wasteful and a diminishing return as well. It will be more practical and less wasteful if a new solution is developed. Spaghetti code is so detrimental, it can even remove the benefits of object-oriented design.

To fix Spaghetti Code, you can refactor your code. Refactoring code is a natural and excellent way to maintain your code and is a wonderful way to increase performance. Code refactoring first must achieve a sufficient structure. Then, performance critical code must be identified and then structure compromises must be implemented as to enhance performance. Of course, the best way to get rid of Spaghetti Code is to prevent it in the first place.

As I was reading this, I knew that this is something that I could apply this almost immediately. In my next semester, I will have to work in a team and build off of an existing program. This Antipattern will stay with me and I definitely will see how I can work refactoring into the process to ensure that no Spaghetti code will remain. I have a sneaking suspicion that refactoring will be an idea that if implemented, will be able to squash many different Antipatterns that show up or are already lurking.

Well folks, this going to be my last blog entry for this semester. Thanks for reading and learning along with me (or watching me read). Until next time, have a wonderful day!

 

From the blog CS@Worcester – Computer Science Discovery at WSU by mesitecsblog and used with permission of the author. All other rights reserved by the author.

Software Engineer Qualification

I am writing in response to the blog post at https://www.shiftedup.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour titled “Five programming problems every Software Engineer should be able to solve in less than 1 hour”.

This blog post shares a story about a history of people who apply for the position of a software engineer and claim some loosely related skills without actually having any chance of understanding or performing the job. The frustration of the author is expressed, and the author lists five programming tasks to disqualify any supposed “software developer” who would not be able to complete them in under an hour. I attempted them myself and they only took five minutes.

I am not sure what motivation people have to apply for a job that they are in no way capable of performing, but the author of this blog post seems to be fed up with how common it is. Supposedly, though, people who do not know what programming is are attempting to become software engineers.

I think that the list of five programming problems and the time constraint of one hour is a generous filter to sort out all of the people who have never written a program in any language ever before. It certainly would not be enough to qualify for the position of a software engineer, but that is not what the problems are meant to indicate upon fulfillment, it is simply what they are meant to reject upon failure. Somebody who claims to be a “developer” and fails to accomplish these simple tasks should revisit their resume.

The problems themselves are very basic. Find the sum of some numbers using loops or recursion, combine elements in two arrays, calculate Fibonacci numbers, and the last two problems are more peculiar but still simple demonstrations of basic problem solving. It should be evident in much less than an hour whether a person is capable of solving them, and any experienced software engineer should only need ten minutes.

The blog post acknowledges some feedback about the last two problems that are a bit less conventional than the others, but I think that the ability to solve unconventional problems is important, and I think anyone who writes code in something besides a markup language or an object notation could solve them.

From the blog cs-wsu – klapointe blog by klapointe2 and used with permission of the author. All other rights reserved by the author.

Crunch-a-Time me Captain (I just took a class on Design Patterns and Just Read That They are Wrong)

If that title scared you, I am sorry. This is the second post I am writing in a span of a couple hours and decided that this topic would prove to be a very interesting one to cover. While the post Rethinking Design Patterns by Jeff Atwood very openly claims that design patterns often cause unnecessary complexity and have turned much of today’s programming army into a mindless army of Gang of Four missionaries I believe it is a very delicate balance of both sides of the argument that is the solution.

In the post Atwood lays out the definitions (yes definitions!) of design pattern in order to get rid of any confusion about what he is referring to. There are two definitions because he is talking about the patterns created by the gang of four in order to solve typical solutions and also the general idea of designing a template for a solution one is faced with based on the circumstances. He also writes about the book that directly inspired the gang of four bible. This book is called “A pattern Language”, and is a direct inspiration for the design pattern book that succeeded it. This book outlines general ideas for solving problems rather than giving the reader templates to solve general problems. While the difference in these may be subtle, the latter cause anyone implementing an idea to have less of an understanding of the implementation and whether the chosen pattern is the best way to solve the problem at hand.

I feel as though the teachings I have received about design patterns has greatly influenced my understanding of coming up with solutions to problems. Before taking this class almost every program leading up to it was extremely complicated while solving relatively simple problems. Many of my programs were one trick ponies that if implementation had to be added would be in need of an almost total rewrite. After learning about design patterns I have the proper tools to increase how modular my programs are which is a huge step in the right direction. I feel like there are many cases where the gang of four design patterns are applicable and can be very efficient but for problems that don’t require a pattern it is important that we as programmers can recognize this and implement a simpler design to avoid useless complexity.

I will definitely be reading A Pattern Language soon because it seems like many of the ideas laid out in that book are extremely helpful in situations where I am tasked to program something that I can’t think of a design for. Thank you for coming to my Ted Talk.

From the blog CS@Worcester – Dummies for Programming by John Pacheco and used with permission of the author. All other rights reserved by the author.