Category Archives: CS343

Progress and Pain

I have not been able to dedicate as much time as I would like to this angular web app project, and I have a lot to learn. I was also not able to incorporate the google sheets api to do the things I really wanted to do. However, what I have done I’ve found engaging and interesting.

I made the decision to simulate a data server in angular. This made data manipulation fairly easy. It took the stress off of figuring out the back-end and allowed me to focus on the other aspects of angular: the structure, services / components, and HTML / CSS. Utilizing several tutorials and guides, I am fairly confident now in creating buttons and forms that accept user input and pass that input into a list. The list is clickable and displays details. It also routes to another page complete with its own URL.

I learned a lot about ngif and ngfor, which work in a pretty familiar fashion. I also learned about the “Slice” function, where you can iterate through a specific part of an array. I am hoping to add a function that will display my win / loss record, which can be done by just adding the values in the “Win” portion of the data, as it is represented by a 1. This is a work in progress but I think it will be doable.

I still think Tour of Heroes should be included in this class. It was such an eye-opening tutorial, and really let me dig deep into learning about services, components, routing, HTML, CSS, and more. While it’s a long tutorial, I think it would be better than Activity 12 for a teaching tool.

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

The end of a struggle…

The final week of the final project was a lot of fun and headache at the same time. My senioritis only got worse over last few days and my motivation to do any kind of schoolwork is at a lowest it ever been this semester. I have forced myself to do work and the project is pretty much done. Me and my group member still need to meet one final time to put finishing touches on everything and create a presentation, but I am not too worried about that.

The challenge this week was the backend code, to be more specific making it add new entries to the database we were using. The REST API we are asking to add things was having some problems with connecting to the database at first, connecting might be a wrong word to use here, the database was refusing the instruction and saying it is a read-only database. After some googling we have found the solution, the file with the database was in the wrong directory on the C:/ drive. It was somewhere where special permissions are required to modify it, making it read-only automatically. Solution: copy the file, move it to some new directory, adjust your connection path in the backend code. (thank you Stack Overflow).

The second challenge for this week came from the fact that me and my group member worked somewhat in parallel on our project(s) due to the conflicts in our schedules. Because of it we somewhat ended with two similar yet a little different project and the fun, and also a hard part, was to merge them into one working whole. We had a little bit different philosophy on how a certain aspects of the project should be done and making it all work together was challenging to say the least. Again, some quick google searches helped us tremendously and in my opinion the overall code should give us a good grade.

This project was a lot of fun and a lot oh headaches, but that is the way of software development, the end result might not always be a satisfying outcome but it is the journey that get us there that helps us learn and grow in this field. I came to a realization that I do not like working with databases or SQL, it seems a little to convoluted in my opinion and every little mistake might be a fatal one for a database. I will definitely stick to more modern programming languages and to working in the software development field.

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.

Project, part 2…

Project for my databases and software architecture has been going well so far. But lately my luck has run out. In my last post about this project I have outlined the steps me and my group member took to design our website as well as make sure the back end of it is working correctly. That part won’t be a problem anymore in my opinion. All that is left in the backend is to make some extra triggers in the database and confirm that all the information is being passed correctly. Like I said I do not foresee any problem with that part.

The fun part or the rabbit hole as I like to call it is now implementing correctly the front end. I have a lot of knowledge base available, but the problem comes in the fact that I want to make certain things work the way I want them to and that might not be how they actually work. To begin with I have started with reading the Angular tutorials (everything can be found here) and trying to figure out how to do some simple programs and designs. Me and my group partner have been working somewhat separately at this point because of our conflicting schedules but we have a working version that, if we run out of time, will use. For me the biggest problem at this point is to have the layout working correctly, all the functions and their behavior are not a problem, but to have the components line up where I need them to be causes me no small amount of headache.

While trying to make this project look nicer on my own, I have met with my partner at a café so we could finally work together and try to figure out some of the problems we were having. One such problem turns out to be a database trigger, we need at least one to have somewhat good database design. The trigger, when we finally learned how to create one, is a simple one that assigns 0 to a column value for a new row in a table. It is nothing spectacular or advanced, but it works and to be honest this is for an introduction database class so in my opinion we do not need anything fancy. (again here is a tutorial for triggers).

As the school year approaches rather fast, I will be spending most of my days on the near future either on this project or on studying for final exams. I cannot wait to be finally done with this semester, as much as I have had fun and learned a lot, I’m starting to suffer from senioritis and my motivation wanes.

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.

Projects, projects, projects…

Working on the Final Project for the Software Architecture class has been fun so far. During this initial week we had to figure out what are we going to do. I have paired with one of my classmates named Zac to work together. All we knew that the project was supposed to be done with the TypeScript and Angular framework. Well then what to do? We had no idea, at least at first, until we got the Databases class where again I have paired with Zac and we were supposed to do a project with databases and some SQL. That is where it hit us: “how about we combine both projects?”, what we meant is using Angular we can create a website that will connect and interact with a database through a REST API we learned about before. Genius I say, only problem was to figure out if that will be allowed, killing two birds with one stone, and guess what, it was ok.

So, with that in mind we went to work. First step was to figure
out what database do we want to use, since that will decide on what shape rest
of the project will take. That is where Zac came in, he is a very talented
musician and he quickly found a free database online that relates to music, it
had quite a few entries, but not too many so it will be fine working with it.

Great, a third the setup is done, step two create a
Wireframe and write a proposal for both classes. Huh, a what? Well apparently,
wireframe is a visual/conceptual design for a web app. Here is some
explanation. That helped us so we went to work. I tell you what trying to
design how a website will look is not that easy, me and Zac had to discuss few
things before we settled on something. Version one is not very impressive and
will most likely change but good enough for now. With it we had the conceptual
work done.

Now all that is left is to make it a reality. Well easier
said than done but that is why we are in school, to learn those kinds of things.
We have started with the basics; can we use Java to talk to a Database? Luckily
in that regard professor from Databases class helped. (here is the
article about it) Ok so we can talk, let’s see if me and my teammate can do
some simple queries with the REST API. YES, WE CAN! Ok we are in business. More
fun will come next, use what we receive from the database and make it work with
Angular, but I will talk about that later…….

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.

Final Project Update: Taking a different shape than planned

The final project for this class is taking on a different form than I initially planned. I had planned to use google sheets API in my project, and while I am not ruling out that possibility, I am running into some roadblocks. The API seems to require authentication that I can’t get to work quite right. I may end up using a different solution for a backend, but we will see.

I am also thinking that my front-end will end up looking not much like my wireframe. At this point I’m not sure I care. Figuring out HTML and CSS implementations for something that I’ve had no experience in for this project is very difficult, and I think I (like most people), will end up modeling my project off of something that already exists. As I posted last week, Tour of Heroes is a very appealing course and I am learning a lot by deep-diving into it. I would highly suggest implementing that into the course. It utilizes a lot of concepts that are useful in angular and in the project: buttons, pages, loops, and CSS stylings, and more.

The other roadblock I am running into is that the work this semester sure has been back-loaded. 5 classes, 3 projects and 4 exams to prepare for is a tough ask. As an adult student with a job and a mortgage, it sure gets stressful. I will definitely not pretend to be the most overworked student ever, and people have definitely overcome tougher obstacles. Yet even still, my despair is immeasurable.

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

Front End Decisions…Back End Decisions…Decisions.

Activity 12 was a good activity to start learning about Angular front-end development, especially with making REST API calls. However, lack of a strong HTML / CSS background may leave some people a bit behind when trying to build something a little more robust. The Tour of Heroes angular tutorial can be pretty useful for a really comprehensive, step by step guide on building a working front-end of a particular style. This could be useful with our upcoming final project to design a single-page web app. I think my plan, for now, will be to start simple, and build on the project as I have more time. I would be interested in eventually implementing the sort of “Second page” that Tour of Heroes has.

For front-end ideas, I did download Professor Wurst’s STEM-TV project and run it. While I appreciated the lecture he gave on the app, I do feel a POGIL style exercise may be beneficial for future classes to really get into the meat of it.

The back-end for my project has been something I’m wracking my brain over. I would like to try to utilize some of google sheets’ REST API features if possible. I am going to experiment with that line of thinking and see where it takes me. I have data that I have actually built myself based on games of Rocket League. I don’t think the data is particularly interesting, but it’s personal and fun.

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

TypeScript, a better version of JavaScript

TypeScript, is it really a better
version of JavaScript? If you are like me and you never used JavaScript before
and then were told that TypeScript is better you will probably have the same
reaction, “OK, so what?”. Well it turns out it is a very useful thing, it is a wrapped
version of JavaScript that will pay attention to the types of variables used
and so on, hence the name. In my search for some answers I have stumbled upon THIS blog by Valentino
Gagliardi named TypeScript Tutorial For Beginners: The Missing Guide (2019).
Like it says it is a whole tutorial, but it also explains in some simpler words
what TypeScript is and why it is useful with a lot of examples. I will go through
it and then look for some more. What helped me right away was Valentino’s explanation
of what is TypeScript: “The definition from the official website says: “a typed
superset of JavaScript” but it assumes you know what a “superset” is and what
“typed” means. Instead to keep things simple you can think of TypeScript as of
“a layer on top” of JavaScript.”

Most of the blog is what it is
supposed to be, a Tutorial, and in my opinion it does it in a very good way, he
starts in an easy way to show certain things, even when somethings is not right
away understandable Valentino comes back to it later and explains in more
detail, what is a plus for me as well is that he does in somewhat humorous way
and that makes the whole learning a more easy going process. Having those kinds
of Tutorials is very helpful for me because knowledge can be learned but what
needs to happen is also the understanding of when and where to apply said knowledge
and with this blog post I’m starting to understand that about TypeScript.

Learning in school about best tools to perform today’s jobs and being able to see it in action before I am thrown into the deep end is a huge plus for me and it should be for everybody else as well. I am always very grateful for the opportunities like this one. I have found out that the TypeScript is used at my work in other departments which tells me it is a good thing to learn and maybe use to further my career. I cannot wait to start writing some more advanced programs in this format, but everything needs to be done slowly, you must learn to walk before you can run and I do intend to be able to run eventually.

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.

Singleton…

This week was all about design
patterns and ways to implement them. We have only just begun and to start with
we talked about Singleton. It is a design pattern that creates a single
instance of a class to be used from a well-known access point. I had some previous
interaction with this particular design pattern at my work, when we were using
the C++ language this was one of the ways we got around some of the problems we
had, since moving to C# it went away but still I knew about singleton before
this weeks class at school. I was a little bit curious and wanted to read about
it more, so I looked up blog post by Ted Neward called, surprise, surprise: “Singleton”.
Link to it is here.

                In this
blog Ted talks about it extensively in my opinion, from the context of it, the
problem that it solves and the consequences of the Singleton implementation. I definitely
like the information provided and it help me expand my knowledge of the design
pattern, which is a good extension on my current knowledge both from work and
school. One of the parts in the blog really helped me understand it better and
that is: “Reduced name space. “Singleton” is just “global” hiding behind
another name. One of the explicit goals (in 1995) was to be able to have the
necessary scope-wide state, but without accidentally clashing over names in
that global namespace. Languages which support explicit namespacing (Java, C#,
C++, Swift, yeah pretty much all of them) mean that we can have this benefit
even without doing anything more than moving the global variable into one of
those namespacing mechanisms.” This describes Singleton as global and I like
this description because it really drove home what Singleton is and how to use
it, I think….

                Overall,
I know I will be learning about many other design patterns and implementations
but for now having this is good enough, who knows maybe others will be a better
solution than Singleton, but I think it is the simplest one to learn. Neward
mention couple of time the debate of Singleton vs statics and that is something
interesting on its own. Something that I will research a little bit more when
time allows. Until then I remember one thing my boss said about singletons back
in the day: “Singletons were used everywhere, and somehow it worked, we didn’t
know why, but it did.”

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.

The Importance of Writing Well

Today I stumbled upon a blog post titled: Undervalued Software Engineering Skills: Writing Well by Gergely Orosz. That can be found here: https://blog.pragmaticengineer.com/on-writing-well/. I found this linked tangentially where the author was mentioning that in order to create clear diagrams that everyone can follow, honing your writing skills in general is one aspect of accomplishing that.

In this blog post, the author talks about how writing and communicating is a very under-appreciated skill that a software developer can have. I think that software devs have this stigma that they are not great communicators and maybe not particularly good with words, so this may be a surprise to some. However, writing well is the first step in creating diagrams that can be followed and amended by a team that is working on a project.

As someone that has worked in the corporate world for a long time with massive amounts of cross-communication between different departments, I can tell you that writing is something that people in every profession could stand to do better. Sometimes something as simple as communicating your thoughts precisely, concisely, and interestingly can be enough to get you noticed, even in a large corporate environment.

The author mentions that for a software dev, writing can be a tool to “influence engineers and other teams outside of your immediate peers.” He also frequently mentions durability, and how the better you are at writing, the more “durable” your decisions, trade-offs, and ideas will be. This will not only help your own career, but will help your team manager their project better.

I am pretty passionate about writing, and I think that in any career, having a grasp on good writing practices can make a huge difference for how you are perceived by your peers, and for a skill that is often seen as ancillary, can be a real game-changer.

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

Digital Code apparently can smell.

How can code smell? This was my
question last class in my Software Architecture class, and I was surprised to
learn that it can. Not literally of course, but because code can be written in
a manner that somebody may say that there is something going bad in here, as
food would. According to Wikipedia
Code Smell is
: “any characteristic in the source code of a program that
possibly indicates a deeper problem” and “Code smells are usually not bugs;
they are not technically incorrect and do not prevent the program from
functioning. Instead, they indicate weaknesses in design that may slow down
development or increase the risk of bugs or failures in the future.” This is a
very interesting topic in my opinion because it can make me and other alike to
be a better coder and help us avoid common mistakes.

While searching for some more
information about the topic I have stumbled upon blog by Jeff Atwood that gives
and describes different kinds of smells that code can have. This directly related
to my class and helped me to specify different problems that can arise when I create
some software. In the class we have described smell in a little bit broader
scope then in the blog, which describes more detailed cases. For example,
Atwood gives us this: “Long Method – All other things being equal, a shorter
method is easier to read, easier to understand, and easier to troubleshoot.
Refactor long methods into smaller methods if you can.”, and in my opinion
anyone writing code nowadays can agree with that assessment. I know it can be
hard sometimes to write a short method because it would be more functional, and
that is a one of the subjects of one of my classes I took before about writing
clean code.

In my opinion this blog is a great reference
for everybody who wants to keep in mind problems that can arise, or to say avoid
you code from smelling a certain way. I know it will be helping me a lot both
in my school and professional life. Eventually anybody can learn this by heart
and know it  at the drop of a hat, but
for me until it will become almost a reflex I know I will be probably using
this post and other like it as a reference. Anybody who has plans to have a career
in a Computer Science field should learn this.

From the blog #CS@Worcester – Pawel’s CS Experience by Pawel Stypulkowski and used with permission of the author. All other rights reserved by the author.