Category Archives: CS-348

What is an API, and why have they become so controversial?

In February of 2023, controversy struck when new Twitter owner Elon Musk announced that developers using the previously-free Twitter API would now be required to pay for its use. The cheapest package was announced to be $42,000 per month for access to 50 million tweets, which unsurprisingly has driven off an enormous amount of researchers and developers who can no longer afford to use the tool. In April of the same year, Reddit.com also announced that their API would no longer be free, charging $12,000 per 50 million requests. This decision too was met with intense criticism, as developers of multiple third-party apps were forced to shut down their services due to the cost.

Rather than trying to weigh in on this debate, let’s look at what an API is, why they are so essential for many of these third-party developers, and why they have quickly become unaffordable.

Firstly, an Application Programming Interface, or API, is an agreed-upon set of protocols that allow for the transfer of data between applications. It functions as an intermediary between systems, allowing for companies to open their application’s data to other pieces of software. This works by providing the framework for the external system to request specific data (known as a “call”), and receive the requested info (the “response”). Let’s look at Reddit for an example.

The Reddit API allows for third-party apps to request and receive data such as posts, comments, videos, etc. to be used on their own application. The app RedReader, for example, pulls information from Reddit and displays it in a way that is more accessibility-friendly than the normal site. To do this, the app must make calls for data to be sent from Reddit servers, which it uses to update its own app.

Here lies the debate regarding paid vs. free APIs; they provide the valuable ability to integrate proprietary software with external applications, the controversy surrounds how valuable this ability actually is. On one side, an API should ideally be profitable for the company designing it to offset the cost of development and to monetize the use of the company’s data. On the other hand, the trend of extremely high prices set by platforms such as Twitter and Reddit have kicked out many smaller development teams, especially those who use the data for non-commercial work. In an interview with Wired, Kenneth Joseph, an assistant professor at the University of Buffalo, explained that his work of analyzing how people use Twitter has effectively been ended by the eye-watering costs of use.

The correct answer to the question of how valuable an API is can often depend entirely on which side of the argument you’re on: company executives will state that the use of their data is something that cannot be provided for free, while developers and researches are adamant that such extreme pricing has made their use unaffordable. In the future, as the amount of available data continues to grow, this debate is surely to come around again.

Works Cited

Binder, Matt. “Twitter’s API Keeps Breaking, Even for Developers Paying $42,000.” Mashable, 29 June 2023, mashable.com/article/twitter-api-elon-musk-developer-issues-apps.

IBM. “What Is an Application Programming Interface (API) | IBM.” Www.ibm.com, 2023, http://www.ibm.com/topics/api.

Red Hat. “What Is an API?” Redhat, 2 June 2022, http://www.redhat.com/en/topics/api/what-are-application-programming-interfaces.

Roach, Jacob. “Why Everyone Is Freaking out about the Reddit API Right Now.” Digital Trends, 14 June 2023, http://www.digitaltrends.com/computing/reddit-api-changes-explained/.

Stokel-Walker, Chris. “Twitter’s $42,000-Per-Month API Prices out Nearly Everyone.” Wired, 10 Mar. 2023, http://www.wired.com/story/twitter-data-api-prices-out-nearly-everyone/.

From the blog Butler Software Construction, Design, and Architecture by Griffin Butler and used with permission of the author. All other rights reserved by the author.

Git for Web Designers: A Guide to Smoother Collaboration

In the dynamic world of web design, managing projects efficiently is a constant challenge, and collaboration between team members is key to a successful management of projects. Without a strong version control system, things can quickly get out of control, leading to lost files, overwrites, and the dreaded conflicts between front-end templates and back-end functionality. In this blog post, we analyze the insights presented in the article “Introduction to Git for Web Designers” explore the benefits of version control and take a deep dive into the world of Git, an open-source version control system that has become a staple for web developers and designers alike.

The Power of Version Control

Version control, also known as Revision Control or Source Control Management, is a game-changer for web designers working in collaborative environments. The basic concept involves a central repository for project files, allowing team members to check out, make changes, and commit them back to the repository. This systematic approach tracks changes, timestamps them, and provides a clear history of revisions. The advantages include preventing file overwrites, maintaining a common repository, facilitating simultaneous collaboration, and offering the ability to revert to previous versions if needed.

The Developers’ Current Struggle

Before diving into Git, many developers manage their files using a crude version control system. Picture a folder filled with various versions of PSDs and other large binary files, an approach that works for static designs but falls short when managing the source code for a dynamic website.

Git: Your Ultimate Version Control Companion

Among the various version control systems available, Git stands out as a powerful, distributed version control system originally created by Linus Torvalds for Linux kernel development. Unlike its predecessors, Git ensures that every user has a complete copy of the repository data stored locally. This distributed nature brings several advantages, including offline work capabilities, resilience against a single point of failure, and faster processes.

The Learning Curve

While Git has a slightly steeper learning curve compared to some alternatives, the benefits far outweigh the initial challenges. Installing Git may seem daunting at first, but there are many online resources and guides to assist users on different operating systems.

Getting Started with Git

Once Git is installed, transitioning an existing folder into a Git repository is a straightforward process. Through simple commands in the terminal or command prompt, users can initialize a directory, add files, and commit changes. Visual tools like Git GUI, GitX, and TextMate with a Git bundle provide user-friendly interfaces for those less inclined towards the command line.

A Peek into a Sample Git Workflow

A web designer’s daily interaction with Git involves checking for the latest changes, making edits, committing changes locally, and pushing them to the master repository. Tools like GitX and TextMate’s Git bundle offer efficient ways to organize commits and visualize changes.

Learn More and Level Up

For those eager to delve deeper into Git, a variety of resources are available. Git cheat sheets, tutorials, and online guides can help developers become proficient in this essential tool. Embracing version control is not just about file management, it represents a fundamental change leading to effective teamwork and project triumph.

Conclusion

In the fast-paced world of web design, mastering version control is an essential skill. Mastering version control with Git isn’t just about files – it’s about smooth teamwork and awesome projects. Git gives you the tools to collaborate without the chaos. So, dive in, make friends with Git, and enjoy a design journey with fewer headaches.

Reflecting on the blog:

In summary, the article “Introduction to Git for Web Designers” stands as a guide for design professionals maneuvering the detailed world of version control. With clear explanations, it unravels the seemingly complex realm of version control, emphasizing Git as a crucial tool for bringing organization and collaboration to the field of web design.

References

https://www.webdesignerdepot.com/2009/03/intro-to-git-for-web-designers/#more-7224

From the blog CS@Worcester – The Bits & Bytes Universe by skarkonan and used with permission of the author. All other rights reserved by the author.

Blog #2: Work Structuring

When our class was being introduced to GitLab, and how to post topics on an issue board there were a couple of terms present within the menus that we didn’t go over in class. These terms are story, epic, and initiative, all of which relate to each other. Conveniently all of these terms build off the formers’ progress, and can easily be slotted into a DevOps-esque working environment.

The first of these terms, a story, is what we are most familiar with as it’s another term for an item selected from the Sprint Backlog. A story is a unit of work that can be completed in a one to two-week span. These often come from user feedback, meaning that the product has seen some use outside of development, however stories can originate internally (just like items on a Sprint Backlog). Stories are supposed to be smaller so developers can take multiple during one sprint with the goal being a handful of stories contributing to an epic.

The next term, an epic, is composed of several stories and aims to explain something larger during the development cycle. For example, if you are developing an app that doesn’t have features such as colorblind compatibility, text zoom, and a narrator, then each of these additions could be a story (can be an epic itself depending on the workload). The epic here would be ‘Improving accessibility’.

The final term, an initiative, similar to the former is composed of the prior terms, in this case an initiative is formed of several epics. These run for a minimum of half a year and can continue well past one. These serve to highlight the direction in which the project is aiming to head towards. Continuing the example from the previous term, if we add epics such as ‘Marketing towards non-likely users’ and ‘sign-on bonuses’ it can fit into an initiative that may be ‘increasing user engagement’.

For the purpose of this class, stories are going to be what we encounter the most, with maybe an epic or two depending on the scale of a project. What I’m curious about is whether these terms can be applied to the capstone project course. That course specifically will focus on working on a much larger scale project, so keeping track of tasks via stories/epics/and initiatives could prove to be effective. A reason why I understand these terms not being taught within the course is due to scaling. We focus on learning agile development as it is much more flexible for both smaller and larger projects, meanwhile an epic-based development process may only see great benefits from working on a larger project.

-AG

Source:

https://www.atlassian.com/agile/project-management/epics-stories-themes

From the blog CS@Worcester – Computer Science Progression by ageorge4756 and used with permission of the author. All other rights reserved by the author.

Blog #1: DevOps Defined

While searching for a first topic to write about, the question in mind I wanted to answer was “What is the formal definition of the processes we have been following” and “How does it all relate to what we’ve learned”. This question was answered by the following article which introduced me to the term DevOps, which is abbreviated for Development and Operations.

The following article grants a brief definition of what DevOps is, but most importantly shows the core values that all tie this subject together. Most of these core values we went over in great detail within our class, such as Continuous Integration and Deployment, while others were completely new to me such as Infrastructure As Code (IaC). This simply put focuses on how we interact with Infrastructure and looking at areas in which it can increase efficiency through automation.

Beyond showing the core values, this article speaks on the best ways these are applied. Some of these topics are implied such as collaboration through Agile Development and Continuous Integration and Development, but there was one I did want more clarity on and that is automation. Fundamentally I understand that teams can use automation to increase efficiency, however it does seem counterintuitive in an environment that promotes teamwork. On one hand, you can increase efficiency by letting automation ‘do its thing’ with little supervision, but that may create future errors. These errors and subsequent corrections will reduce efficiency later in development. If you allocate one (or more people) to frequently supervise the automated process, then there’s less of a risk of something going wrong, but you lose the efficiency that one (or more) people could’ve provided. By arguing this I’m not stating that automation does not have a place within DevOps, but that it may be a dangerous inclusion if not accounted for correctly.

Overall I found this article useful in expanding my knowledge of what we’ve learned throughout the semester, the visual(s) provided showing each component of the DevOps processes did help too. One thing that I would suggest for future semesters is maybe looking into how automation can be integrated into DevOps and appending it to your current lectures/activities? I think the curriculum for CS-348 is very good as of now, but adding a unit about automation could maybe help answer some of the questions I asked and potentially could help future students be ready for what they may see in the workforce (beyond college). Lastly, the source in which I retrieved this information seems to be a post on LinkedIn by a company named Quality Matrix Group, so there seems to be plenty of credible information within the post.

(Bonus points for them being based locally in Westborough MA!)

-AG

Source:

From the blog CS@Worcester – Computer Science Progression by ageorge4756 and used with permission of the author. All other rights reserved by the author.

The Importance of Clean Code

Ever struggle to read another developer’s code? Code should be easy to follow along with, especially for a reader entirely new to the codebase. However, sometimes developers write “spaghetti code”, with random variables or methods mixed together in a non-understandable manner. 

Gary Espinosa of Reflectoring.io believes that clean code is the best code, and it’s super important for companies and coworkers. He lists suggestions such as variable names being descriptive, methods shortened, code broken up, etc. Let’s dive into what he suggests.

Espinosa discusses the huge importance of clean code, and how it can make or break a codebase. Not only is code the flesh and blood of a program, but it is also a form of communication between collaborating developers. It helps enable easy understanding of code and editability without errors. Companies who need to ensure their code is clean often spend time and resources just making it easy to comprehend.

Clean code should be readable; this involves grouping similar functions and classes together, similar variables, etc. The document should flow like an “engaging narrative from top to bottom” (Espinosa). If possible, one idea per line and one action per statement is key.

You should also be able to keep your code consistent. There must be a standard for writing code, variables, and methods. Examples of this would be using camelCase for all your variable and method names, using specific indentation rules, and more. A unifying language reduces differences.

One should strive for simplicity, but with descriptive language as well. Variables, methods, and classes should have meaningful names that describe the point of themselves easily. For example, you shouldn’t use a name like “x1” or “yY” as they don’t provide the reader any insight as to what they’re for.  

I selected this resource because it lines up with what we’re currently learning, and it is a key importance to being a software developer in the industry. If you want to have your pull requests approved, write clean, understandable code. This topic intrigued me because it’s quite simple but I wasn’t sure if there were any specific industry standards for clean code. There are definitely certain uniforms industry-wide, but I’m sure that it depends from company to company.

Espinosa’s article was informative, and explained what’s important and why about clean code. It’s useful to those new to programming, or those who are experienced in coding but just entering the professional industry.

I learned how important clean code actually is, not only to the programmer but to their coworkers and the company as a whole. Alongside this, the article taught me how to effectively organize and write code in a clean and understandable manner. This led to an increase in my confidence in my ability to clean up my code. I want to apply this knowledge to my future jobs and perhaps go back and clean up my old projects to make them easier to comprehend.

Article: https://reflectoring.io/clean-code/

From the blog CS@Worcester – Josh's Coding Journey by joshuafife and used with permission of the author. All other rights reserved by the author.

The Steep Curve of Game Development and its Tools

I’ve taken programming classes for over five years, however, just programming is not my end goal. My goal has been to get into the field of game development. 

Classes that tackle game development are rather rare and aren’t offered at most schools, so I haven’t had the opportunity to learn in a classroom environment. This means that my goal depends on my drive to learn game development in my own time. After looking into what makes a game, specifically the technical aspects of it, I found that I have much to learn. 

Development of a game can be divided into five general sections: the engine, programming, visuals, audio, and testing.

Engines are software platforms that provide “the core functionalities and features for developing and running games.” The most popular game engines today, such as Unreal Engine and Unity, are extremely versatile and allow the whole or most of the game development process to be done in that platform alone. 

Any game, at its core, is a bunch of code. And while you can develop games without programming knowledge, it becomes very difficult at the higher, more professional levels. Programming language is usually up to user preference, although some tools may require specific languages.

Visuals and audio are rather similar in the fact that both require great creativity and are crucial to games today. Any model, texture, sound effect, and music are created from scratch or borrowed from some library. Software for both categories are typically used by artists of all kinds; music producers, artists, graphic designers, and such.

Finally, testing is the “last” process of developing the game. This could be seen as the verification and maintenance steps of software development. Making sure that there are no bugs and that every other section is working properly is crucial to a better user experience.

That’s a lot of things to do in order to create a game. So many processes, so many programs and tools to learn, and so many skills I need to learn. Learning a tool is one thing, mastering one takes so much time and effort. It makes me think about how I want to tackle my goal, do I focus on one section of game development? Do I learn a decent bit of every section? I have no clue.

It feels like the path to achieve what I want becomes longer and longer. Procrastination, poor time management, and lack of dedication only worsen that. 

If you want to achieve things, you have to take the first steps towards them. I want to land a career in game development and in order to do so, I need to learn. In my free time, I will spend some of it learning online and tinker around with free game development tools until I feel confident in my ability. I could then develop my own game and take those next steps toward my goal.

https://www.linkedin.com/advice/0/which-technologies-tools-do-you-use-game-development#:~:text=Some%20of%20the%20testing%20tools,analytics%20to%20improve%20your%20game.

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

Week 12

This week we talked about development environments and what they are used for. A development environment is the space where developers can work, experiment, and test without worrying they’ll interfere with the experience of real users. One important environment commonly used in the developing world is Visual studio code. We looked at some of the extensions needed in VS code to run a program successfully. Visual studio code also has a dev container. Containerization has helped developers install particular operating systems and dependencies with particular version numbers with tools like docker. This has solved the problem of developers running different operating systems and having different versions of dependencies installed. Another development environment we looked at is Gitpod. It is a cloud development environment that lets you develop in pre-built development containers, running on their cloud infrastructure, and use a variety of IDEs in your browser. Therefore, you don’t need to install docker or any IDE, and your development doesn’t depend on your local machine’s resources.

Gitpod enables developers to immediately start coding, debugging, and testing their code. We also looked at command scrips mainly a build script and a lint script. Build scripts are used to create artifacts or packages for later development. They do this by getting code from a source code repository like git, then running tools like MSbuild or Gradle to compile and test the code. Build scripts are used for projects that are complicated to build because we don’t have to remember all the details in which to run multiple commands. A lint script is a tool that scans your code with the goal of finding issues that can lead to bugs or inconsistencies. For the blog I chose, it talks about what development environments are and how to get started with them. Development environments allows software developers to create, run, and test their application code in a way that’s adequately realistic and safe. It is important for development environments to offer isolation to developers. This means that they can do whatever they need in their environment without concern that they are breaking someone else’s work.

I chose this resource because it goes more into detail about development environments and why they are important to developers in the real world. These different environments help developers be able to do their work without interfering with the user experience. Developers also must keep the environments as close to each other as possible and containers are a great technology for enabling that.

References.https://www.plutora.com/blog/what-development-environment-how-get-started-now

From the blog CS@Worcester – Site Title by lynnnsubuga and used with permission of the author. All other rights reserved by the author.

Scrum Sprints

A Scrum Sprint is an event that allows a scrum team to work towards a goal in a time-boxed event that is known as a Sprint. In my class we have been talking a lot about Sprints as well as all of the different roles that each of the team members may be. On top of that, we discussed what each role does and even had a mock Sprint in order to see what they are like. I think that Sprints are really helpful in order to help get work done, and that it works a lot better with less people as long as you trust that they will get their work done successfully. As a computer science major, I feel like I will take place in a Sprint at least one time throughout my career, so I enjoyed having a mock in order to feel what it is like. However, since the mock was only one day, we didn’t get to experience the different roles in a team. But while researching, I came across a website called Atlassian which I think does a really good job at explaining all of the different steps in a Sprint, as well as what each of the roles in a Sprint team does and how they help achieve the Sprint goal.

There are three major roles in a Scrum Team. These roles are developers, the product owner, and the scrum master. In my opinion, developers are the most crucial role in a Scrum Team. Developers are the ones that do the actual work in the Sprint allowing the team to get closer to the Sprint Goal. They do things such as organize, design, test, and deliver the software. Basically, they are the workers that make the develop the software and make sure it does what it is supposed to. One of the other major roles is known as the product owner. The product owner is the member of the Scrum Team that interacts and communicates with the customer. They find out what the customer is looking for in the product and then relays it to the rest of the team, which results is finding out the product goal. According to Atlassian, “Since agile teams are, by design, flexible and responsive, it is the responsibility of the product owner to ensure that they are delivering the most value. The business is represented by the product owner who tells the development what is important to deliver.” This further shows that the product owner needs to be a trustworthy person and good at communicating with others, otherwise the Sprint could fail before it even begins. The final major role in a Scrum Team is known as the scrum master. The scrum master is the glue of the group. This role helps out the other two by helping the product owner define value, while also helping the developers deliver the value that was promised to the customer. The scrum master is like the leader of the group, helping where they can while also making sure that the work gets done on time without error.

Synopsis: https://www.atlassian.com/agile/scrum/roles

From the blog CS@Worcester – One pixel at a time by gizmo10203 and used with permission of the author. All other rights reserved by the author.

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.

Week 11 Blog

This week’s topic I decided to choose a blog post about the writing of clean code to correlate with what we’ve been learning in class. The blog post, published by Jacob On Software, details how the writer has been reading Clean Code by Robert Martin. This handbook identifies the significance of writing clean code, as well as, how to properly write readable and professional code. Jacob On Software takes a unique and effective approach to teach readers; refactoring one of his old projects. Jacob states in his blog post that during this project, he was forced to learn how to create a full stack web application in just three weeks, resulting in him rushing and writing not so clean code. The blog post highlights that other contributors working on his project will have strenuous time trying to decipher his messy code, hindering the development process and evolution of the software.

Looking at an image of the his code, we can see that the name of his functions are descriptive of what they accomplish, however the functions themselves have too many lines of code, which is a crucial aspect detailed in the Clean Code book. Having functions that are thousands of lines long makes it a nightmare to understand what the function is doing. Clean Code emphasizes that functions should be small and straight to the point. Jacob fixes his code by splitting up the function into smaller functions. Additionally, Martin’s Clean Code stresses that a function should do one thing. Previously, Jacob’s function was performing multiple operations like holding data and updating it. These operations were split up into their own functions, allowing others to instantly understand the purpose of these functions.

Further into the blog, Jacob talks about the formatting of his code. The more lines a file has, the harder it is to understand. Users only have a limited amount code that will fit on their screen at once. If the developer has to constantly scroll up and down through hundreds of lines just to understand your code, you are not writing clean code. The same can be said horizontally, lines in your code should not be extending off to the right of the screen.

I chose this topic because after looking at the examples of bad code and good code in class, I admit that most of my code that I’ve written in other classes would be considered bad code. Non-descriptive variable/function names and multiple operations in functions have definitely been a weakness in my code. It’s crucial to write clean code as software developer working in a team so other team members can easily understand your code. I plan to use this information as a guideline on how to write more descriptive and readable code in the future.

Blog Post: https://medium.com/codex/reading-clean-code-week-2-643641e4dc28

From the blog CS@Worcester – Computer Science Through a Junior by Winston Luu and used with permission of the author. All other rights reserved by the author.