Author Archives: anthony duong

Clean Coding Practices

The blog post I selected this week is an article by Sanura Hettiarachchi called “10 Clean Coding Practices”. I chose this article with the homework and the expected lectures coming up this week on coding practices. Prior to reading the article I understand effectively using white space, making comments, and declaring meaningful variable names are practices often recommended. When reading the blog, the article goes through each of practices mentioned in detail as well as other tips. When writing variable names, I often have a hard time making meaningful variable names for long declarations. In the article it provides good examples of condensing these variable names for example, changing

“Person [] peopleFromIndiaWhoCanSpeakFrench;” can be condensed to “indiansSpeakingFrench”. The article also provides bad coding practices with variable names that many without understanding of clean coding may not follow.

In addition the article talks about following correct name conventions corresponding to different coding languages. The example brought up was someone in C# would Pascal Case while someone in Java would use CamelCase and it is important to research practices for a specific language to keep documentation clean.

When writings methods, the article suggests method names that effectively describe its uses but something that stuck out to me when describing practices for methods were keeping parameters to a minimum of three. Often in my practices in Java, I use alot of parameters in my methods which I will not keep into account.

Also described that I found very helpful is where to declare variables, Sanura recommends declaring variables at their point of use instead of at the top of a method so that you don’t have to scroll back and forth to understand the code.

Another really good practice I saw in the article is reducing numbers which can be simplified to a constant variable.

Other practices mentioned include not to leave dead code/commented code, minimizing extensive nested conditions, try not to implement long functions, avoid code duplication.

When reflecting on this blog on it’s use of the course as well as in my career, I can see these coding practices being very useful and something I can always use. In addition, I am expecting to see some of these practices in the upcoming lecture this Tuesday and Thursday coming up. With the project on Markdown to HTML I can see the importance of following clean coding practices especially while working in a group with others to ensure everyone is on the same page.

https://medium.com/swlh/10-clean-coding-practices-e37ac283184d

From the blog CS@Worcester – Anthony Duong CS Blog by anthony duong and used with permission of the author. All other rights reserved by the author.

Software Copyright Licensing

The blog I chose to write about today will be on copyright and licensing in software with that being one of the main topics in the course and to get a better understanding on licensing. In the blog “What is a software license?” by the website Synk.io, provides an in depth blog on types of software licenses, how it works, uses, as well as management of them. The blog mentions how software that is not covered by a license is categorized as “public domain software” or “private unlicensed software”. In the example Professor Wurst mentioned in class previously about wanting to implement a software in the course which had no license falls into private unlicensed software. The software although unlicensed still falls under copyright protection thus unusable for others. The blog mentions examples of when common users would see software license agreements. These are often listed in the terms of conditions prior to installing any software under a end-user license agreement (EULA).

The graphic above displays the 5 different kinds of licenses and shows the level of restrictiveness depicted by the arrow going from less restrictive to most restrictive. The article further goes in depth for each of the 5 license types software.

The article describes how software that use Public Domain Licenses typically run into the issue where the code might not follow the best procedures and standards. Which is a consequence of the nature of the license. I can see a lot of educational software or software for non profit being released under a public domain license.

The next license that the article talks about is LGPL and how “developers have rights to link open source libraries within their software”. In other words, LGPL lets you add licenses to code without completely releasing the entire source code.

Permissive licenses are what we have researched the most in class which ranged from Apache to MIT licenses that often require copy right notes within the software.

Interestingly when the article talks about Copyleft licenses it mentions how it probably is not the best license for software developers due to the reciprocal licensing of resulting code in other words, all derived code has to follow the same copyleft licensing. With that being said, copyleft licenses are probably best used for research/educational purposes or for very transparent community collaborations.

Lastly, the most restrictive licensing type proprietary are often used by large corporations and protects the owners/developers from unauthorized use. When doing further research for applications that use Proprietary licensing I found that the application Skype a proprietary license thus the source code is not provided publicly and is owned by Microsoft.

Overall, when reflecting at the different types of licensing and my personal goals. I see myself in the future using a permissive license like the MIT license for straightforwardness and simplicity. To add to that, currently for our program on Markdown to HTML my group is using a MIT license for those reasons.

https://snyk.io/learn/what-is-a-software-license/

From the blog CS@Worcester – Anthony Duong CS Blog by anthony duong and used with permission of the author. All other rights reserved by the author.

Software Development Methodologies

The blog I have chosen to write about this week is a article called “12 Best Software Development Methodologies” by intellectsoft to research and learn more about the different types of software development methodologies. The reason why I chose this article in particular is how in depth it goes into each methodology, the pros and cons, and when to choose specific methodologies. The article mentions which I found very interesting is how as software becomes more advance with time, companies spend more and more on researching and improving past development methods.

In class this week we have gone over what the steps are in software development as well as waterfall and agile methodologies. When reflecting on the waterfall technique, it does not seem very practical to use with changes not being possible without restarting the entire development process again, however the article states how there are relatively no financial risks “due to the high planning accuracy” and every step has a given deadline. In addition, the long delivery time may be caused if not everyone working on the project are not on the same page. This method is not suitable for larger or on-going projects.

The agile development method that focuses on the project / product itself. In class, we watched a video on Agile of what the sets of values Agile had which included “Individual and interaction over processes and tools” as well as “Responding to change over following a plan”. As Agile is a very flexible and on-the-go methodology it risks insufficient budget predictability. The article states how this method “fits, young companies … open for communication” which provides top of the line product quality.

A method that I found interesting that was not talked about in class is the Spiral Development Model. This method seems to be a “hybrid” of both waterfall and agile. Like the waterfall method this method is done in phases as well as has an emphasis risk management. In addition, similar to the agile method it has client collaboration throughout the process in increments. This method appears to have the best of both worlds of these two methods however it is not suitable smaller projects.

When reflecting on software development processes there are many different factors to consider when following a methodology. Some of these factors include cost, project size, risk tolerance, client suggestions and so forth. When looking at smaller projects that I may collaborate with a team I may consider using agile methodology or lean development which both receive feedback throughout the process as well as flexibility.

Link https://www.intellectsoft.net/blog/top-12-software-development-methodologies-you-should-know/

From the blog CS@Worcester – Anthony Duong CS Blog by anthony duong and used with permission of the author. All other rights reserved by the author.

What is Git?

For the entirety of this course so far we have been working and getting familiar with the version control tool git. In this week’s blog I will be writing about a blog called “What is Git | Explore a Distributed Version Control Tool” by Reshma Ahmed. I have chosen this article in particular to see how it came to existence, the roles they play in companies, and to get a further understanding in addition to what we have learned in class.

From the article I have learned the different types of version control such as centralized version control system and distributed version control systems. Git was created in 2005 by Linus Torvalds designed to “handle small to large projects with efficiency”. Git is a distributive version control system which is a system that prevents corruption and crashes that were caused from having a server hosted in a single repository such as in centralized version control systems due to everyone having a copy on their machine of their local repository. When reflecting back to the course we have been practicing with pushing and pulling from repositories, branches, as well as removing and adding commits. The GitKit activities worked on in class shown us practical issues that one may face with git such as merging issues as well as issues involving different versions of commits.

The article describes some of the features of git which we have looked at in class such as being open source as well as being secure. Open source software encourages transparency, collaboration, and accessibility similar to the FOSS communities mentioned in the first GitKit activity done in class. The article reads “Git uses the SHA1 to name and identify objects within its repository”. This concept becomes apparent from seeing in the GitKit activities done in class when applying commands such as “git log” that shows a commits’ hash as well as the date a commit was made.

Git not only is used in the software development community but plays a detrimental role in companies with more and more companies using git as their go-to version control system. Some of these companies include tech giants such as “Facebook, Yahoo, Twitter, eBay, Salesforce, [and] Microsoft” which shows the significance of git.

When reflecting for my personal future use of git, practical applications of git in the field of machine learning and data science is using git to manage datasets to ensure reproducibility as well as data integrity. In addition, I plan on using git for my data mining course project when collaborating with other peers.

Links

https://www.edureka.co/blog/what-is-git/#companies_using_git

From the blog CS@Worcester – Anthony Duong CS Blog by anthony duong and used with permission of the author. All other rights reserved by the author.

Introductory blog post

Hello this is the first blog post on my website. I will be documenting my CS journey as well as podcasts and other literature related.

From the blog CS@Worcester – Anthony Duong CS Blog by anthony duong and used with permission of the author. All other rights reserved by the author.