MC Press Online

Tuesday, Jun 27th

Last updateTue, 27 Jun 2017 9am

You are here: Home ARTICLES Programming Programming - Other

Programming - Other

C# for RPGers: Taking C# Loops for a Spin

Rafael Victoria-Pereira

The missing piece to the basic C# language puzzle will be presented here: looping structures. You already know FOR, but there’s more!

Written by Rafael Victoria-Pereira

few TechTips ago, I talked about the FOR loop and how it works in C#. It’s now time to explain the other looping structures that this amazing language has to offer. I’ll be using the exact same test task in all of the code snippets: I’ll print a simple count from 1 to 5 using a loop.

Read more ...

TechTip: Node.js iToolkit Mods

Aaron Bartell

Walk through a real-world scenario of how Aaron Bartell approaches changes to open-source projects.

Written by Aaron Bartell

In a recent blog post, Jesse Gorzinski, Business Architect - Open Source on IBM i, focused on the "Power of Community." The community is the only way open source not only survives but thrives. There's a lot of activity in IBM i open source right now, and I hope that trend continues.

One aspect that kept me from originally participating with open source is I didn't know how to interoperate with the community and participate in changing code repositories. This article documents a real-world scenario.

Read more ...

TechTip: C# for RPGers: Making Stuff Happen, Part 2 - More Flow Control Structures

Rafael Victoria-Pereira

Last time around, I explained the IF statement. Now it’s time to get to know a couple more C# flow control structures.

Written by Rafael Victória-Pereira

If you read the previous TechTip of this series, you already know that the IF statement in C# is similar to its RPG counterpart. It’s true that there are differences, but in general they’re pretty much alike. Even though I didn’t mention it in the previous TechTip, you can create IF-ELSE-IF structures in C# just like you do in RPG. As you know, abusing this facility usually leads to a stairwell-like structure (if you’re using RPG /free and proper indentation) or a Find-The-Right-EndIf game (similar to Where’s Wally, but not so fun). To avoid these pitfalls, a sensible programmer uses a Select-When structure instead of nested IF-ELSE-IF blocks. There’s also a similar control flow structure in C#, under a different name: Switch-Case.

Read more ...

TechTip: Node.js JoinJS

Aaron Bartell

SQL result sets are flat for joins. That makes it more complex to process both in business logic and UI. JoinJS to the rescue!

Written by Aaron Bartell

I am currently coding a Node.js project for a customer that uses the HapiJS web framework. We had the need to create a JSON result object from DB2 that conveyed a list of employees and their department associations and send it to the browser. In short, the SQL result set looked like the below.

Read more ...

New Features in Visual Studio 2017

Joydip Kanjilal

The latest version of VS offers enhancements for performance, mobile and cloud app dev, and more.

Written by Joydip Kanjilal

Visual Studio is Microsoft's flagship development IDE for software developers wanting to develop applications that they can leverage at the managed environment. The latest version of this IDE is Visual Studio 2017, released to the public on March 7, 2017. You can take advantage of Visual Studio 2017 to build and manage applications for Android, iOS, Windows, Linux, Web, and the cloud.

Read more ...

C# for RPGers: Making Stuff Happen, Part 1 - Introducing Flow Control in C#

Rafael Victória-Pereira

Now that you know a few things about declaring variables and using methods, let’s see how to make decisions in C#, using logical operators and the IF statement.

Written by Rafael Victória-Pereira

It’s time to move to a new topic: decision making. In order to do that, you’ll need to know how to declare variables and use methods in C#. If you’re not entirely sure how to do that, go back a few TechTips to get comfortable with these things.

Read more ...

So Many Languages, So Little Time

Brian May

Believe it or not, there are programming languages on IBM i other than RPG and CL. So which one do you learn next?

Written by Brian May

My last article addressed investing in yourself and your career. That included adding new skills to your toolbelt. Many IBM i developers have yet to venture outside of the world of RPG. In fact, some haven’t even fully explored the world of RPG! As with many things, one of the biggest obstacles that prevents developers from learning is simply indecision.

Read more ...

TechTip: Trees Are Good for Climbing and More

Aaron Bartell

The “tree” command can quickly show you the structure of an IFS directory, but it’s not installed in PASE by default. Learn how to get it.

Written by Aaron Bartell

My days are in large part spent in the PASE environment on IBM i. PASE is based on AIX, and both are Linux-like in their abilities, though PASE does not contain many commands and utilities that I'd consider on the "need" list. Sometimes I'm also doing things on Linux systems and get exposed to utilities and commands that I then desire to have on PASE. Such was the case the other day when I was writing my "PASE Intro" lab for COMMON Spring 2017. I needed to print out a directory listing of parent and child directories, and I knew the Linux “tree” command would foot the bill. Well, I quickly learned it didn't exist in PASE, so this article will convey the steps I took to get it onto PASE.

Read more ...