Author Archives: Joe Barry

Post #1 for Individual Apprenticeship Patterns

Perpetual Learning Pattern: Expand your Bandwidth

This pattern is a very interesting to me. I worked as a software developer from 1980 – 2015. During this time, I found it necessary to take advantage of many resources. Some of these resources were offered to me by the companies I worked for, but more often, it was necessary for me to discover information on my own. I work for over 30 companies. In this 35-year span, I worked as an employee for 15 years, and as a contractor/consultant for the other 20. The employers were usually really generous about paying for tuition reimbursement, computer related conferences, and in-house training. As a contractor, more often I was required to pay for any career advancement benefits myself.

I really didn’t mind this, since they generally paid better, and there is far less politics involved in being a consultant. I was expected to be able to do the work I was hired for, and that usually sufficed.

I was lucky in the sense that I was really motivated to learn new technologies as they came out, and as a result I spend many hours outside of work reading over 100 textbooks, trade journals, attending conferences, and developing my own products.

I managed to gain a large skill-set learning for my own personal development efforts, and this knowledge, along with all I learned “on the job” was parlayed into knowledge, as well as resume entries, making myself more valuable, and allowing my career to “ride the wave” of progress in software as it occurred.

Yes, it is great to expand your skill-set, but if I have any word of caution to those seeking this path, make sure you study a skill as deeply as you can, so as to avoid being a “jack of all trades and a master of none”. I found the best balance to be found in trying to stay with a project for at least a year, but less than 4. In this range, you get deep enough into the peripheral skills they require, as well as sharpening your primary skills.

I worked as a mainframe developer in the 80’s and migrated to being a windows developer by buying my own equipment, teaching myself C and the Windows SDK (with a lot of help from the Boston Computer Society). I made a similar jump in 2008 from C#.NET enterprise level development to becoming an Android developer by jumping at the chance to develop an Android application by my company, but this was only possible because I had already developed the skill-set on my own.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

The journey of a Software Craftsman 

In past years, various crafts, like blacksmiths, and more recently plumbers and electricians have followed a process where a craftsman’s skills were developed over 3 basic stages. When just starting out, an apprentice is taught the basics of his craft, and earns their keep by doing menial tasks and odd jobs, along with a basic wage. After becoming more adept at their craft, they “graduate” to journeyman. Since their skills are now more valuable, they then can do the work of a journeyman. They are now in a position to keep learning from the masters, but also to be in a position to teach what they have learned to new apprentices, and are then given responsibilities and compensation to reflect their new status. Eventually, when they have learned all that they can from their mentors, they become masters in their own right, and are positioned to start their own business.

This can be correlated to the growth of a software developer. The Computer Science college student in combination with their first few years as a developer in industry are equivalent to being an apprentice. My first title was Junior Programmer. The names have changed so much over the years because of the growth of the industry that specific titles are almost meaningless when compared over the years, but one of many potential titles for apprentice may be Entry-Level Software Developer. When they reach the equivalent of a journeyman level, they may have progressed forward to having a skillset of Software Engineer, Database Analyst, Mobile Developer, or may have jumped into a management position. In any case, they have either directed their career path or grown into a certain role where they are now in a position to be competent and valuable in their “craft” and may be rewarded financially and socially rewarded for their efforts. Whichever of the hundreds of possible fields they may have climbed to, they are hopefully still learning from their “masters”, peers, and most importantly, their own self-directed educational path. The “master” title could be correlated with Senior Software Engineer, Software Architect, or many other roles. The most important factor at this point is that they still keep learning.

The Apprenticeship Patterns book is a comprehensive guide to not only how to grow in your career, but also to continue to love to do the work. It explains well the soft skills that are necessary to be happy, productive, socially respected, and egalitarian in your career. Worrying about how much money you make or being the best on your team are common goals but need to be considered less important then being a life-long learner in a field you truly love. Who could ask for more?

The book then proceeds through 6 chapters that describe Zenlike wisdom on ways to smooth the transition through the journey. Emptying the Cup was particularly important for me. I tend by nature to be impatient at times, and not to listen well enough. This is a particularly important one for me keep practicing. I also like the advice from Walking the long road. I never expected I would every surpass the knowledge of Linus Torvalds, but I do realize that my life’s journey may produce positive results in a direction that helps the software world, as well as keeping food on the table.

1. Dave Hoover and Adewale Oshineye. 2009. Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman (1st. ed.). O'Reilly Media, Inc.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

CS 448-02 – Setup Task # 4 Conventional Commits 

I found the conventional commits description under “Thea’s Pantry Workflow” interesting. This is new to me, but I see the importance of being able to control all developers to use the same formula in describing commits. It is also necessary to use the semantic versioning [1] to not only be an asset to developers and managers following other developer’s work in a controlled manner, but allowing the connection of the GitLab commits to be integrated with testing, and deployment in an automated fashion (CI/CD)

[1]  FIX/PATCH  – generally bug fixes

      FEAT/MINOR – a full new feature that does not break the code-base,

      BREAKING CHANGE/MAJOR.

I am also interested in learning Kubernetes, as well as understanding better how continuous integration and deployment will be used in our product.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog Post 448-01:  Code of Conduct Pledge

I found the pledge for the code of conduct to be really well written. My wife worked for the Office of federal contract compliance program (OFCCP) as a compliance officer to monitor corporate discrimination. Their “affected classes” were limited to a list including the disabled, sexual discrimination (usually with women being paid less than men), Vietnam war veterans, and a few others. It always bothered me that the list of classes never included gender identity, body size, and personal appearance.

The Pledge by LibreFoodPantry fills in many of the gaps with a much fuller definition of areas of discrimination, and then follows with “Our Standards”, which lays out a clear utopian view of how we should behave in teams and is as essential education for students who are about to enter the business world as any of the technical skills we are learning. The stressing of positive communal behavior is probably the most important thing to learn for entry into business world.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog Post # 7: Review of software components used in our CS-343 Software Architecture class

While attempting to brush up on knowledge on Frontend Web development presented to me in my Software Architecture class at WSU, I found a YouTube video [1] that contained a stack of free software tools and apps that fit closely with the class architecture.

Our class has shown usage of the following tools to give us a real-world cutting-edge view of what is being used by software engineers primarily geared towards enterprise-level web application development. They are all Open-Source and free to use for all.

1. Docker – A containerization model being used to run software components in virtualized containers. It is more efficient and easier to use than either virtualization environments like VMWare, VirtualBox, as well as Microsoft’s Hyper-V, which will be a contender in the future, but is “too much tool” for most current business needs.

2. Visual Studio Code – An integrated development environment (IDE), which is free, lightweight, surprisingly usable and extensible. Its limitations imposed by its general size are more than made up for by the vast amount of 3rd party extension libraries that exist for it.

3. Operating Systems: Another huge advantage of this stack of products is that most if not all of them are available in some form on Windows 10/11, macOS, and many forms of Linux.

4. Design Tools: PlantUML – Fantastic in unison with Swagger Preview to produce useful design documents.

5. For Backend Development: Used by servers in association with databases to store and secure data.

  • Node.js – The most commonly used open-source backend JavaScript Framework.
  • MongoDB – A NOSQL database that uses JSON information embedded in non-relational data relationships.
  • Express – A really handy JavaScript Framework Extension.
  • Swagger Preview – A tool used to show JSON or YAML file formats in a mock UI format. It allowed us to test all of our JSON/REST database call from our back-end projects.  

6. For Frontend Development: Used to write websites (or mobile applications) to interact with users.

  • Vue.js – A JavaScript framework used to build UI’s and SPA’s (Single Page Applications). IMHO, it is at least as useful as Express is on the backend.
  • AXIOS: Integration of this package helps with controlling asynchronous HTTP requests to REST endpoints.
  • JavaScript: Of course, but with the help of Vue and Axios, not much actual barebones JS was really needed.

7. Source Code and CI/CD:

  • GIT – I have used git on a number of projects in the past and have had trouble with it at times because I had been used to more traditional non-distributed source control systems. The instruction in this class has shown me how amazing it really is, and it will remain my highest regarded VSC system.  
  • GITLAB:  – I have used GitHub in the past and am now more of a fan of GitLab. 3 cheers for the sole developers. 3 cheers for Dmitriy Zaporozhets and Valery Sizov. It is a web-based DevOps lifecycle tool supporting GIT, issue-tracking, and a continuous integration and deployment chain.

A few helpful hints I picked up from the YouTube video are:

  1. GUID Generator: UUIDV4 is a tool that can be downloaded using NPM (a Node Package Manager) which will generate Globally Unique ID’s for use with our application. [2]
  2. POSTMAN – This is a great tool for testing your API’s [3]
  3. JSON Formatter – Really useful when looking at complex JSON strings. It is usable in most modern browsers. [4]

As a final note, I think that although there are many other tools out there that could have been used to build the instructions for this class, and that software tends to live in an environment of competition from other companies, that this stack wins in my mind, because it is fully open source, completely cross-platform, and very leading-edge. Vue, as an example, would not have been pushed into the tool it is if it were not for competition from REACT and ANGULAR. Competition brings us all forward, but open source has the additional benefit of being altruistic.

References:

1. Building a REST API with NODE JS and Express

2. https://www.uuidgenerator.net/version4

3. https://www.postman.com/product/rest-client/

4. https://jsonformatter.org/

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog Post #6 – SQL VS NOSQL

After having listened to blogs and watched videos [1] on SQL VS NOSQL and having spent a number of years working as a SQL developer, my view is that this isn’t a battle. Each have their own uses in a given situation. There are times when you need a very strong, well organized, secure, database design, and this will usually fall to being a SQL database. This is usually, but not always done in a business or enterprise setting, but also works well on mobile and desktop friendly implementations.

NOSQL is really just a growth from other ways simple data formats have been carried around over the years. Starting with flat files, then to CSV (comma-separated values files), then to more formalized “strings” of data in the world of markup languages. This started with SQML/HTML, then to XML, then to JSON. These formats continue to evolve to worlds of XAML and others, but for our discussion, let’s use JSON.

It is easy to describe my lunch as “Name: Joe, Time: Noon, Food: Cheeseburger”.

There is no implied database in this text string. It clearly says my name is Joe and I eat burgers at noon. In SQL, there would be Students, Orders, Inventory tables, all with multiple links and schemas to describe the same line. ( The key/value pair Name/Joe is represented in JSON as Name: Joe,)

It is very important to determine what your requirements are before deciding on if or what technology to use for a given purpose.

There are times when writing and testing particularly sophisticated SQL stored procedures where I was frustrated with the complexity and rigidity of the data integrity requirements but was then rewarded with the benefits of the product. Very well encapsulated, easy to use once constructed, stable, secure, fault tolerant products were the goal.

On the other hand, it is easier to use JSON to describe simpler situations that don’t require the relational connection between components that SQL vertical databases do.

I think both the XAML and JSON markup formats are easier to read than XML or HTML. I am also a fan of CSV files when key/value pairing isn’t required.

The internet seems to have “wars” frequently on what is better A or B? This very frequently comes down to “Sometimes A, sometimes B”. This competition between ideas is the reason I am optimistic towards the future. Someone is always trying to reinvent a better way to do almost everything.

As a software developer, you are constantly learning, relearning, unlearning, reevaluating, and improving. This process is enjoyable to me, but I know some who hate their job because of this constant change. For me, the key when getting frustrated on a problem was in learning how to back away, take a walk, and come back with a fresh outlook.

References:

1. U.S. Financial services market

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog # 5 JavaScript (3 important Concepts)

I have used JavaScript in the past, along with HTML and CSS, but was surprised to see the use of newer features I had seen in other languages like Java and C#.net being used heavily by JavaScript extensions like Vue.js. Some may consider these features to just be “syntactical sugar”, but once used, they tend to be really important in their ability to make your code more readable and useful.

I watch 2 YouTube videos on “The 5 Must-Use JavaScript” features, one by James Quick and one by PedroTech. This is my opinion of information I have consolidated from these tutorials.

1. Equality:

I have been used to seeing the “double equals” ‘—’ being used to differentiate between assignment statements (with a single =) and equality statements (with a double ==). This is pretty standard, but the use of a triple equals is new to me. As an example, if S1 is a string with the numbers “456”, then

(a). S2 = “456” assigns the value of S2 to “456”

(b). S2 == S1 compares “456” with “456” and returns TRUE

(c). S2 === 456 Compares String”456” with number 456 and returns FALSE.

This shows that (c) guarantees you are using the save values and object types (or primitives). (b) is useful because it works comparing both objects and primitive data types. Since the double equals seems to have been added to languages to differentiate between assignments and comparisons, the triple equals give a stricter control by guaranteeing value AND data type are identical.

2. Asynchronous JavaScript:

JS has been using callbacks since its inception. Over time it evolved into using Promises and Async Awaits.

GOOD – Callbacks: It’s older method where function pointers were passed to the callback function (like in C).

BETTER – Promises: This method uses error handling mimicking the try/catch/finally blocks used by most modern non-interpreted languages. E.g.

Set fetchData = new Promise();

fetchData.then(),catch().finally();

The logic for try goes in the then() method. If an exception occurs, the logic in the catch() block is called. In all cases, the finally() block is called for cleanup tasks.

BEST – Async Await:

This process is seemingly used more frequently, because it allows the developer to embed the logic for both the calling code and the receiving code to be implemented in the same method and is somewhat easier to use as a result.

3. Array Iteration:

Older method for iteration:

Let numbers = [1,2,3]

For (let i= 0; i < numbers.length; i++ {

 Console.log(numbers[i]);

}

Newer method:

Let numbers = [1,2,3]

Numbers.ForEach((element) => { console.log(element); }

This may seem like a minor difference, but, when understood properly, syntactical sugar like this can make your coding life simpler and less error prone.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog # 4 Design Patterns (Accidental and Intentional)

During my career as a software engineer, design patterns were heavily used by some clients, and were not used at all by others. I was exposed to them early on by a developer at UNISYS while developing a Windows based control system for NTSB. At that time, there were class library extensions in the marketplace which were commonly used to enhance UI and database access development. We had the opportunity to code our own classes using their framework, as week as modify their code. In order to use their code in a proper way, you had to really understand it, which involved studying the extended class library code and documentation. While doing so, I became familiar with 4 design patterns they had heavily used. These were Singleton, Observer, Iterator and Builder patterns

My architecture class has shown me 3 new patterns I am very impress with. The memento, strategy, and the facade pattern. The class focused on the strategy pattern primarily, with some concentration on the Singleton. Memento and Façade patterns.

I will focus on the benefits of the strategy pattern for this blog entry because I found it to be eye opening. It is very powerful and useful, yet I hadn’t known of it specifically prior to the class. It turns out I had used this pattern many times without knowing it.

Many project I have worked on had objected oriented class libraries, where a solid grasp of OOP programming skills were necessary in the mid-to late 90’s and early aughts. Interface based technology grew into the class libraries and class library extensions, where interfaces became a really useful tool. There were times I coded directly from an interface (when trying to implement a specific API, or to a specification requiring a specific interface), and other time would purely use the Object hierarchy. There were times I had probably used the strategy pattern BY ACCIDENT! By knowingly combining interfaces and OOP with the use of the strategy pattern, a much better design can be constructed where you get the best use of both technologies.

I find the best way to concisely describe the power of this pattern is to quote from the “Better Programming” website [1]

Advantages of the Strategy pattern

1. It’s easy to switch between different algorithms (strategies) in run-time because you are using polymorphism in the interfaces.

2. Clean code results, because you avoid using conditional-infested code (not complex)

3. More clean code, because you separate the concerns into classes (a class to each strategy).

I wish I had had a clearer understanding of this pattern years ago. The example in the Homework using Duck classes was particularly easy to follow, and really showed the symbiosis of interface oriented and object-oriented methodologies in clear way, stressing the benefits of coding to separation of concerns in a well-structured project.

Design Patterns are broken up into Creational, Structural and Behavioral classifications as a way to direct the designer to the appropriate top-level category.

References:

1. http://www.betterprogramming.pub – Carlos Cabarello.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Best Docker Tutorial IMHO

While in the process of trying to learn Docker as part of my Software Architecture class, I watched 5 YouTube videos. YouTube has been a real benefit to me for learning college level science courses. I have had good luck with Biology, Organic Chemistry, and even Statistics tutorials, but have not had much luck so far with Computer Science videos. There are some good ones out there, though, and “Docker Tutorial for Beginners – A full DevOps course on how to run applications in containers [1] is certainly one the best I have seen.

This 2-hour course by Mumshad Mannambeth covers all the bases in a clear and interesting manner and is enhanced with well thought out structure and graphics. The lectures are accompanied by direct access to a full-fledged Docker environment through labs [2] on a website

The course is broken up into sections exploring the definitions of containers, images, Docker itself, why you need it, and what you can do with it. He then goes on to explain the basic commands needed to create a docker image, how to build and run it in a container, the basic concepts of Docker Compose, YAML, and DockerFile.

He leaves the technical details of installing Docker Desktop for Windows and the MAC until later in the video, giving more time up front to clearly describe why you want to use it, what it accomplishes for the software development community, and how containerization is the future of enterprise level software. These installation sections are also well done but are not relevant for those who already have docker installed, or for those without the time to build their own environments. The tutorial and accompanying interactive quizzes on the right side of the site, are resources I will come back to in the future, because of their depth and clarity.

He then allocates about 40 minutes going into docker concepts and commands in depth and follows up with a history and description of the importance of continuous integration using container orchestration tools like Swarm and Kubernetes. He clearly lays out the architecture of a system that is complex, distributed, fault-tolerant, and easy to implement. He details the importance of DevOps, where the design, development, testing, and operations teams are seamlessly connected and have a symbiotic relationship. This makes everyone’s jobs easier, cuts down on departmental finger pointing when things go wrong, and brings product to market much quicker and with less bugs shipped.

He also covers the following areas:

1. Layered architecture

2. Docker registry

3. Controlling volumes

4. Port forwarding

5. Viewing logs

6. The advantages of container architectures over Virtual Machines and Hypervisors.

7. KubeCtrl

I was pleasantly surprised to have found this. Maybe I should give the computer science YouTube community more credit.

References:

[1]  YouTube link:

[2]  Tutorial links:

 www.freecodecamp.org

 www.kodecloud.com

Exhibits:

(1) Why do you need Docker?

(2) Container orchestration tools

(3) Layered architecture

(4) Hand-on Lab

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Blog Entry #2 – Visual Studio Code Extensions and keyboard shortcuts (Part 1)

VS Code’s best feature is its flexibility and extensibility with the use of its ability to encourage the development of 3rd party extensions to tis functionality. I read documentation on these extensions and have watched a number of YouTube videos on other developer’s opinions and have come up with a list I think will be most useful for our architecture class students. Although I initially wanted to highlight these from the perspective of a Java develop, I have changed it to focus on the usefulness of the tool as it will most likely be used in our class, as reflected in the blog entry title.

I will start out with a short list of keyboard shortcuts that I think are essential to memorize. [1,2].

Although there are many extensions which will allow you to the use key-mapping from other editors, I found this troublesome when switching to the (Android Studio) IntelliJ shortcuts, because only the shortcut keys are changed, and not their corresponding menu items. Although I had worked with these key extensions to the point where they were second nature for a while, I switched back to using vscode native commands because of the lack of full integration. I have enclosed a map of these shortcuts at the bottom. These shortcuts are the generally the same between MACOS and Windows with the exception of Ctrl+ being used on Windows, and Cmd+ being used on the MAC. For the sake of clarity, I will use Ctrl+ here, and if you are using a MAC, please swap it with Cmd+”.

It is an important point to realize that for productivity, it is better to use the mouse as little as possible. These commands go a long way to making that happen.

Many more useful shortcuts exist and have multiple entries for different areas of focus in the UI. You can use the same shortcut, for instance, that is accessible in terminal, and also in the main editor, and it is context sensitive to that area. The user is allowed to add or change any shortcuts themselves, and third-party extensions can add their own.

Because of the need to keep this within a 500-word range, I will continue this discussion with my investigate on Extensions exclusively on my next blog post.

PARTIAL LIST OF USEFUL SHORTCUTS:

These shortcuts are broken into 3 sections (Open/View, Working with files, and Code Editing).

Open/View:

  • 1.         Opens command palate. – Shift+Ctrl+P
  • 2.         Access Settings – Ctrl+,
  • 3.         Toggle terminal – Ctrl+`
  • 4.         Toggle Sidebar – Ctrl+B
  • 5.         Open new window – Shift+Ctrl+N
  • 6.         Close Window – Ctrl+W
  • And, one of my favorites:
  • 7.         Selecting a vertical column of characters – Ctrl+Alt+Shift + Mouse select

Working with files:

  • 1.         Sidebar focus                          – Shift+Ctrl+E
  • 2.         Open File/Folder from Sidebar – Ctrl+Down
  • 3.         Change file tabs                      – Ctrl+PageUp
  • 4.         Quick File Open                     – Ctrl+P
  • 5.         Open File Explorer                 – Ctrl+O
  • 6.         New File                                  – Ctrl+N
  • 7.         File Save                                 – Ctrl+N
  • 8.         Save file/Save All                   – Ctrl+S  or ( Save All Ctrl K,S )
  • 9          lose File                                   – Ctrl+
  • 10.       Delete File                               – Ctrl+Delete
  • 11.       Zoom                                       – Ctrl++ ( Zoom in ) or Ctrl+- ( Zoom Out )
  • 12.       Split Editor                             – Ctrl+\

Code Editing:

  • 1. Navigate through line by word       – Ctrl+Right (Forward ) Ctrl+Left (Backward)
  • 2. Move to beginning/end of line        – Home/End
  • 3. Move line up/down                         – Alt/Up-arrow Alt/down-arrow
  • 4. Go to start/end of file                      – Ctrl+Home Ctrl+End
  • 5. Cut, Copy, Paste                             – Ctrl+X,Ctrl+C, Ctrl+V. If you are hovering over a line or a line is selected, the line will be used. If an item is selected, it will be the item affected.

Reference:

[1] VSCode Keyboard shortcuts for Productivity – Traversy Media

[2] VSCode keymapping documentation

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.