Computer Science concepts you can learn from block-based programming

I have signed up to volunteer for the Swedish nonprofit organization Kodcentrum this autumn. Kodcentrum introduces kids to programming and digital creation free-of-charge. We will be using Scratch in the coding labs, and I’ve played around with Scratch previously on a couple of occasions.

A course on Snap!

To prepare myself for the volunteering, I signed up for the MOOC Programmieren mit Snap!, which was offered free-of-charge by openSAP this summer. Snap! is an extended re-implementation of Scratch and the two languages as very similar. The user creates programs in a visual drag-and-drop environment.

The course took about ten hours to complete, and I’m impressed by how much content and how many fundamental as well as more advanced computer science concepts the instructors were able to explain and demonstrate.

Concepts covered

Let’s have a brief look at the concepts covered.

Fundamentals

A lot of the fundamentals were illustrated by creating images and art. The first example illustrated positioning, loops, and visual effects by creating a digital wildflower meadow.

The basics of color theory were explained in an exercise to create geometrical forms of different types and colors. I found it interesting that Snap! uses HSV (hue, saturation, value) instead of the RGB color model, which I’m more familiar with. According to Wikipedia, HSV was “designed in the 1970s by computer graphics researchers to more closely align with the way human vision perceives color-making attributes.”

The use of variables was introduced in the context of for-loops, and the outcome was spirals of different sizes and forms. At a later stage, lists were introduced for grouping several related values.

Advanced concepts

The principle of parallel computing was introduced by letting the student create a simple drawing program, in which the user creates two mirrored images by having two scripts executing in parallel.

Messaging between objects was introduced by creating a simple game where a character navigates through a maze. The objects communicated when something happened in the game loop.

A SierpiƄski triangle was created by applying a chaos game method. Fractals and emergence were also introduced. There are really a lot of interesting graphical representations which can be generated by a very small amount of code.

Snap! can be used for more advanced use cases by importing libraries. A neat example was the use of a text-to-speech library for generating and reading out loud different newspaper headlines.

Cloning was used to create somewhat psychedelic graphical animations.

As you see, a lot of ground was covered already, but no computer science programming introduction is complete without introducing the student to recursion. I really enjoyed this part of the course, and the output was a tree image with very detailed branches.

Conclusion

I was familiar with most of the concepts covered in the course, but some of the graphical applications were new to me since I don’t do any graphics programming in my day job. I very much enjoyed the course, and I’m impressed with the instructors as well as with what can be achieved in a block-based programming language.

If you have children, and you want to introduce them to programming, I think that Snap! and Scratch are both excellent choices. They are most likely also great introductory tools for adults who want to get an initial idea of what programming is all about.

I highly recommend the course, which is available both in German and in English. I have only taken the German version of the course, so that is what this blog post is based on. You can sign up for any one of the courses free-of-charge. Happy coding!

Open-source project: SAP/styleguides – Clean ABAP

A highly valuable resource for the ABAP developer is the clean ABAP guide available on GitHub.com under SAP/styleguides. The guide helps the ABAP developer in writing clean code.

What is clean code?

The bible of the clean coding movement is the book Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin. The opening quote of the book states:

Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.

Robert C. Martin

In the foreword of the book, the following summary of clean code is given:

… Yet attentiveness to detail is an even more critical foundation of professionalism than is any grand vision. First, it is through practice in the small that professionals gain proficiency and trust for practice in the large. Second, the smallest bit of sloppy construction, of the door that does not close tightly or the slightly crooked tile on the floor, or even the messy desk, completely dispels the charm of the larger whole. That is what clean code is about.

James O. Coplien

As you understand from the quotes above, we need to focus on the details in order to write clean, professional code.

Clean ABAP

There are numerous open-source projects and style guides available for writing clean code in different programming languages. The open-source project SAP/styleguides concerns itself with ABAP, the high-level programming language created by the software company SAP.

The Clean ABAP guide gives the developer recommendations on a number of basic topics, such as naming, constants, tables, strings, booleans, and conditions. The guide also digs deeper into more advanced topics, such as OOP best practices, error handling, and testing.

The guide is written in a dense way, without lengthy discussions. It is very much to the point and provides a number of useful examples on patterns and anti-patterns. For quick reference, there are also cheat sheets available.

The project license is CC BY 3.0. For a human-readable summary of the license, see the summary by Creative Commons.

Conclusion

Writing clean code is an essential characteristic of a professional ABAP developer. There are many useful patterns and recommendations presented in the SAP/styleguides project. I think that every ABAP developer should be familiar with the guide and its concepts.

For the developer who has worked for several years with ABAP, I particularly recommend the sub-section Modern ABAP Language Elements which gives a neat summary of newer ABAP syntax.

Start reading about and applying clean code concepts today! I promise that the quality of your code will improve a lot.

Disclosures

I’m an active contributor to SAP/styleguides.

The link to the book Clean Code: A Handbook of Agile Software Craftsmanship is an affiliate link. As an Amazon Associate I earn from qualifying purchases.

SAP Fiori 3: The next level of SAP’s design system

SAP launched the first version of its design system Fiori back in 2013. The first version was limited to self-service scenarios targeting the casual user. In 2016, Fiori 2.0 appeared on the scene, expanding the scope to targeting the power user. SAP is now presenting version 3 of Fiori, and I’ve just attended a MOOC on openSAP covering the topic. The course is Intelligent Enterprise User Experience with SAP Fiori 3, and it’s available free of charge. In this post, I will summarize my main takeaways from the course.

User experience goals

With Fiori 3, SAP wants the user experience to be:

  • Consistent
  • Intelligent
  • Integrated

Let’s have a look at these three goals in more detail.

Consistent

Consistency means that Fiori 3 should provide a harmonized look and feel across the SAP product portfolio. Since SAP has expanded its product portfolio through several acquisitions (e.g. SAP Fieldglass, SAP Ariba, SAP Concur), the UX of the different systems is not consistent.

I think it is great that SAP addresses this topic by harmonizing the design and providing a new visual theme. The reworked home page also looks promising, with the tiles we know from previous Fiori versions being replaced by cards. The cards are much more flexible and interactive than the tiles. Also having a common shell bar for all products will definitely help the user who is currently working in several SAP products.

Intelligent

SAP has lately been pushing the “Intelligent Enterprise”, which consists of the intelligent suite, the digital platform, and intelligent technologies. Fiori 3 is an important part of this vision and will provide natural language interaction as well as machine intelligence to make the UX intelligent.

SAP CoPilot is a digital assistant with conversational UI. According to Gartner: “There is a big, disruptive platform paradigm shift coming now. Conversational AI platforms (CAPs) will be the next big paradigm shift in information technology.” I think it is interesting to see the digital assistant concepts which we are familiar with from our private lives now being applied to enterprise software.

Another interesting approach to provide an intelligent UX is proactive business situation handling. This means that the system captures a current business situation and its circumstances. The user is provided with an explanation of the situation and its impact on the business. The system also provides possible actions ranked by preference, together with explanations of the proposals. Making the system act proactively in this way sounds very promising to me.

Integrated

The integration provided by SAP Fiori 3 is at the UX level, integrating content from different products into a single screen (the home page). This approach has several advantages, like:

  • Eliminating time-consuming cross-product navigation
  • Collecting items from different systems in a universal inbox for efficient processing
  • Informing users of changes as they occur by handling notifications across devices, enabling users to respond immediately
  • Consolidated task area collecting everything users need to do in a single place
  • One digital assistant across all products

Final thoughts

I think that Fiori 3 is an important part of the intelligent enterprise vision of SAP, and I welcome the initiative. It’s important to know that Fiori 3 won’t be introduced as a big bang approach, but rather will be launched step by step. SAP expects that the first innovations, e.g. the theme, the look, and the header, will become available in many of the products towards the end of 2019.

If you found this blog post interesting, I would encourage you to attend the course Intelligent Enterprise User Experience with SAP Fiori 3, which takes somewhere in the range of three to five hours to complete. Please share your thoughts in the comments section.