Category Archives: Introductions

CS Journey Begins

Never been the type of person to blog but I guess we all start somewhere ?

From the blog CS@Worcester – CS: Start to Finish by mrjfatal and used with permission of the author. All other rights reserved by the author.

From C to Shining Sea

The Snake

As of recently, I’ve been spending most of my personal coding time in Python. I enjoy a lot of languages and Python certainly isn’t for everything, but when you can use Python, boy is it a joy. As someone who strictly indents in any language, I love the indentation style of denoting blocks. Curly braces have their use, but the vast majority of the time, they’re purely redundant. The same goes for semicolons. I completely agree with the movement of programming languages towards spoken language. The main downfall of Python, comes from how high-level of a language it is.

Being a high-level language allows for it to be as convenient to write in as it is, however you are completely unable to use low level features. It also means Python’s performance is often much lower than that of C++ or other languages. Of course, everyone says that each language has its own use and Python isn’t meant for performance-intensive programs. But why not? Wouldn’t it be nice if there were a single modular language that had Python-like simple syntax with the features of JS, Python, C++, etc.

The Sea

Before I take on the task of creating such a language, I want to start smaller. Introducing Sea- It’s C, just written differently. I am currently working on a language called Sea which is effectively C, but with Python-like syntax. I say Python-like because much of the syntax of Python relies on internal data types. My goal is to keep Sea true to C. That is, no increase performance penalty; all of the penalty should be paid at compile time. That’s phase one. Start off with a more concise face for C. Then, I want to create libraries for Sea that take it one step further – introducing data types and functions innate to Python like range, enumerate, tuples, etc. Lastly, I want to use the knowledge I’ve gained to create the language to end all languages as described above.

I’m starting off with a Sea-to-C Transpiler, which is available on Github. In its present state, I am able to transpile a few block declarations and statements. I’m currently working on a data structure for representing and parsing statements. Once that’s made, I can add them one by one. The final result should look something like this:

include <stdio.h>
include "my_header.hea"

define ten as 10
define twelve as 12

void func():
    pass

int main():
    if ten is defined and twelve is defined as 12:
        undefine twelve
        // Why not

    c block:
        // Idk how to do this in Sea so I'll just use C
        printf("Interesting");

    do:
        char *language = "Python"

        print(f"This is an f-string like in {language}")

        for letter in language:
            pass

        break if size(language) == 1
    while true and ten == 11

    return 0

Once the transpiler is done, I want to create an actual compiler. I’ll also want to make a C-to-Sea transpiler eventually as well. I’ll also want to create syntax highlighting for VS Code, a linter, etc. It has come a surprisingly long way in such a short while, and I’ve learned so much Python because of it. I’m also learning a good amount about C. I’m hoping once I create this, there will never be any reason to use C over Sea. There are reasons why certain languages aren’t used in certain scenarios. However, I see no reason why certain syntaxes are limited in the same way. Making indentation a part of the language forces developers to write more readable code while removing characters to type. Languages should be made more simple, without compromising on functionality. That is my goal.

From the blog CS@Worcester – The Introspective Thinker by David MacDonald and used with permission of the author. All other rights reserved by the author.

Introductory Post for CS-443 and CS-448

Hello everyone! This is just a quick post to say I’ll be writing periodic blog posts for both CS-443 and CS-448 this semester. I’ll be looking forward to writing for all of you. Feel free to also browse any other topics I’ve discussed and past classes I’ve written for as well!

From the blog CS@Worcester – The Introspective Thinker by David MacDonald and used with permission of the author. All other rights reserved by the author.

Introductory Post for CS-343

Welcome! First I would like to point out that all posts for this course should all be placed in roughly the same categories. However, they all will be tagged with CS-343. This should make them easy to find.

These posts will be centered around me searching for online materials other people have posted that relate to the core topics of CS-343. I will then be sharing them, interpreting them, etc. It will be a collection of information primarily useful to the following topics (as taken from the course syllabus):

  • Design Principles
    • Object Oriented Programming
    • SOLID
    • DRY
    • YAGNI
    • GRASP
    • “Encapsulate what varies.”
    • “Program to an interface, not an implementation.”
    • “Favor composition over inheritance.”
    • “Strive for loosely couples designs between objects that interact”
    • Principle of Least Knowledge
    • Inversion of Control
  • Design Patterns
    • Creational
    • Structural
    • Behavioral
    • Concurrency
  • Refactoring
  • Smells
    • Code Smells
    • Design Smells
  • Software Architectures
    • Architectural Patterns
    • Architectural Styles
  • REST API Design
  • Software Frameworks
  • Documentation
  • Modeling
    • Unified Modeling Language
    • C4 Model
  • Anti-Patterns
  • Implementation of Web Systems
    • Front End
    • Back End
    • Data Persistence Layer

Hopefully, these posts provide you with many resources to help you learn these topics for the first time or to help you recall them after a long time has passed! I wish you the best of luck in whatever you’re hoping to achieve!

From the blog CS@Worcester – The Introspective Thinker by David MacDonald and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns Introductions

After reading the Apprenticeship Patterns book introductions and a few of the patterns, I have to say they are very straightforward, which the book itself admits. The utility in reading them is that is is very easy to forget these ideas, or never apply them to your work.

I was ready to condemn the book from the beginning, as it introduced the idea of apprenticeships in medieval through industrial revolution times. I thought to myself how naive it is to write a book about such bad situations, and that the authors must be romanticizing this time. This thought was immediately shut down as I read the line, “we believe it is possible to reject the romantic fantasy”, in favor of something better. This served to drive further points home, as I had just fallen victim to some of the behaviors it warns against.

This book describes patterns that “are tools that solve one set of problems and create new ones.” And it says that “the trick is to use your judgment to choose the problems you prefer.” I love this idea because it illustrates the fact that one doesn’t need to be able to solve every problem if you can figure out how to solve it with the tools already at your disposal.

At the same time, it provides a framework for learning more tools. The idea of “exposing your ignorance” stands out most, because most of us want so badly to be intelligent and competent. Having spent some time in the workforce without a degree, I have become sensitive to this: trying hard to prove that I’m not “dumb”. Maybe it was actually that, that had slowed me down.

On “Emptying the Cup”

It’s always a good reminder that you might not know as much as you think. Or if you do, that you might be biased and closed to new ideas. I am very proud of some of my work, having had moments where I feel like a programming God, and in the face of a new technology, I am always humbled. But I feel that I run the risk of using my past professional and education experiences get in the way of new methods.

On “Accurate Self-Assessment”

I had to read some of these patterns, because I tend to self-assess in the negative direction. I already usually assume I’m “the worst”, or that my work isn’t good enough, and seek improvements. Still, the patterns themselves are useful, describing how to solve this problem. I tend to spend too much time assessing. I need to consciously tell myself to move on to new things, rather than dwelling on what has been done and how it can be done better.

…And Onward

My capstone team has been discussing learning some new technologies, and these introductions have lessened the fear of diving in and trying them. At the end of my college career, I have been reflecting on what I could have done differently, or how I could have done it faster, so this book comes at the perfect time.

Haven’t we all sometimes wanted a chance to start over again? How exciting to have a chance to be at the beginning of something.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.