Back to Basics: Pseudo-Coding

 


Every step in this process has built on knowing what the plan is for your code. But we have one final planning step that will help ensure you know exactly where you’re going when you do start writing code before it’s time to get into the trenches of writing code: pseudo-coding


Welcome to Back to Basics, a series where we’re going to be reviewing basic engineering concepts that may require a more complex explanation than a quick Google search could provide.

Outline Comes Before Draft — Always

Pseudocode is a way to design code without worrying about syntax. It looks like code, but it doesn’t actually run. Think of it this way: before writing an essay, you create an outline as a map to help you get from one idea to another so that you can follow that map when it’s time to actually start writing the paper.


The goal when pseudo-coding is to look at the project from a bird’s eye view, and then get more granular. To do this, we go through multiple layers of detail.


File/Class Structure

You already know your project’s intended functionality and your design requirements. The next step is to break that grand overarching task into smaller chunks. When using functional programming languages such as C, these smaller chunks are your files. When using Object Oriented Programming (OOP), each chunk is a class. 


For example, if you were writing code to create a digital car, some of the design requirements would include working wheels, an engine, headlights, and seats. Each of those components should be broken into its own class or file.


While it is sometimes simple enough to sketch the different classes or files needed for your project on paper, more complicated tasks necessitate the use of tools. For OOP, there are many different tools to help make class structure diagrams, some of which may come pre-baked into your chosen IDE. IntelliJ IDEA has a built-in class structure tool, but if you’re looking for something separate from your IDE, there are also online options available, including Lucidchart, GenMyModel, yUML, and others.

Comments

Popular posts from this blog

14 incredible places in the UAE you need to visit at least once

UAE, Pakistani FMs discuss cooperation, strategic partnership

Strengthening China UAE Ties through Joint Cooperation on the Belt and Road Initiative