Wednesday, January 4, 2023

LOL While Coding in 2023

Just a few days ago there was a thread on one of Rocket Software's community forums about users entering car license plates and searching the database for them. Their database has license plates like this list: QAA.6814, QAA-6814, QAA 6814, QAA/6814, or QAA6814. So, the proposed solutions were to create an index that cleans them up using "MCAN in the OCONV() function only leaves alpha and numeric character, eliminating all others." My best guess is this shop is a telnet shop using D3, a Rocket Software database.

You should be asking yourself why am I laughing when I should be crying? Using telnet you and D3 BASIC code which does not support regular expressions (i.e. regex) put you in a bind. You can use an OCONV to clean up the data as the user enters it or not and get this mess as described above.

The first thing any programmer worth their salary should be asking themselves, why have you not cleaned up the data? After you have done that fix the data entry program to stop letting the garbage in. Fixing this index for the user inquiry is like putting a tiny bandage on a head wound that keeps bleeding it takes a lot more to stop this kind of thing.

The laughing part is from realizing that I stopped building telnet applications some 20-plus years ago and stopped getting junk in the Universe/Unidata/D3 databases. With HTML5 you can add a regular expression to a pattern option. This means that garbage data would not get into your database because you stopped it at the time of input. When you index the field you would not need to clean it up just create an index on the data field.

Since I moved away from telnet and cleaned up our databases for our clients and ourselves, I cannot think of a time when we have had to clean up anything. Before there was replication, I wrote a routine to capture the changed data with a before image and an after image. That way if a user deleted a record or I needed to find the errand user that screwed up the data. Our XLr8Audit system had the goods to restore the deleted record of informing the boss and the user of the problem that was created by them which could be backed out as well.

Our job as programmers is not to let this stuff in the first place. If you do then your battle will be a lifetime of work to keep up with users that you let them enter anything. A former staffer that did our QA always said to us programmers that if you allow them to enter GIGO the problems are with you not them.

Someday, you have to stop programming in telnet and embrace new technology. Those companies who do not do this will have their software replaced and maybe their whole department. A former Universe client had roughly 5 programmers that wrote the entire system that ran a county in Colorado. The entire staff was replaced by 40 programmers writing in Java and other languages using Microsoft SQL Server, not Universe/Unidata/D3 databases.

Wednesday, March 30, 2022

Upgrading after 4 plus years

 When Eclipse 2022-03 came out this March, I was very happy that I could finally upgrade from the 2018 release. I could not believe it, I could be on a current release of Eclipse IDE. So, you might be asking yourself why were you stuck on that old release. Funny you should ask that and I will tell you the short version.

A couple of companies in the Eclipse world one called IBM and the other called Actuate Corporation were the large companies formally in charge of the development of the Business Intelligence Reporting Tool (BIRT). Somehow in the intervening years, Actuate got bought out by OpenText in 2015. OpenText pretty much stopped the development of the free version of BIRT and either transferred those Actuate employees or let them go. IBM, on the hand, just canceled its BIRT team around the same time even though many of their product relies on this technology for reporting.

This left BIRT with only a few volunteers to fix the bug and put out releases. Although they tried the last workable release was 4.8 in 2018. That is the release I have been using for about 4 plus years now. It worked but was based on Java 8. With each subsequent release of Eclipse which included new Java code, BIRT would not work with the other components that it relied on. Therefore you could not put the 4.8 packages into any new releases of Eclipse IDE.

As I have said many times before, Rocket Software Universe or Unidata has no built-in way of reporting except for the PRINT (page 295) statement using the PRINTER ON statement before that statement. So you have to write code to do logos, formating, paging, headings, and of course footing. With BIRT, however, you can print amazing reports. You can see one of my reports in the BIRT Gallery under the company name U2logic.

Sometime around the spring of 2021, a new group of volunteers started to work on bringing BIRT up to Java version 11 and hopefully releasing it to the public within a few months. It turned out that they were very optimistic about that goal. Nonetheless, just this month BIRT was released without a lot of fanfare. The wonderful engineers fixed numerous bugs and brought a release that works with the current version of Eclipse. Oh, by the way, I am using Java 17 with BIRT and it works wonderfully.

U2logic tool XLr8Reporter is now available for free with the purchase of any other product of XLr8. That means if you have a copy of our XLr8Editor or our other products you can use the BIRT designer interface to Universe and Unidata to create PDFs, XLSX, DOCX, and HTML reports for you or your shop.


Tuesday, January 11, 2022

Teaching an old dog new tricks

 It has been said that most programmers in their '20s are in their prime and they know everything. It has been said that most programmers in their '30s are good at hanging on to their job with the skills they learned in the last 10 years. It has been said that most programmers north of their '40s are just knowledgeable on what has been done and are always viewed with suspicion because their skill set is believed to be 20 years out of date. It has been said that most programmers just north of their '50s have limited knowledge of today's languages and technologies since their skill set is 30 years out of date. It has been said that most programmers in their '60s should have already retired or must be hiding in the mainframe closet because nobody remembers what languages or technology knowledge they could have known.


Why would you decide either overtly or covertly to not continue learning? If you are a lawyer most states require Continuing Legal Education or CLE to maintain your standing in the bar association. Lawyer in many states, you must have additional hours in professional responsibility and ethics and other courses. Engineers, depending on their specialty, may be required to complete Professional Development Hours or PDH to maintain their state license. Some states require as well some hours for professional ethics as well as other courses. Software engineers are not considered real engineers and almost all states do not require a license. However, if you call yourself an engineer in some states you can get into a bit of legal trouble if they find out you are just experienced in software.


Could this be why most programmers do not consider themselves to be software engineers? Could this be why most programmers loath learning a new skill or even being certified on some vendor products? Could this be why year after year the skill set of programmers on balance never grows? Could this be why when a new release of the database, or a new release of your particular programming language specialty that the documentation sits unread?


Well some of us think this should not be the case. On average the databases, I work on are updated every 18 months. The manual that comes with it has to be read from cover to cover to see what changed or to see what I have forgotten. The latter is most often the case but I digress.


The database Universe started supporting JSON through a library call. There was little fanfare on the normal sites I look at. The documentation supplied by Rocket Software was very poor with no decent examples. About 5 years later there was a good example from one of their engineers a little late for me. Nonetheless, I was able to wade through the syntax and get an idea of what it could do to replace our hand-coded string builder. I converted our handed coded JSON string UniBasic code to create JSON objects using the new functionality. For the most part, it took about 2 days to get the production code changed to use this new library call. Ironically, to create JSON the new way was not much faster until the strings reach about a megabyte then the code was much faster. Below is a sample of the changes.


SET.PROPERTY.OLD:

     JSON = "" ; ADD.IT = @FALSE

     MAX.FM = DCOUNT(PARAM1,@FM) ; * Example: CustomerName:@FM:Address

     FOR X = 1 TO MAX.FMT

        IF ADD.IT THEN JSON := \,\

        JSON := \"\:PARAM1<X>:\":"\:PARAM2<X>:\"\  ; * PARAM2 is the data        

        ADD.IT = @TRUE

     NEXT X

     RETURN.ID = "{":JSON:"}"     

     RETURN



SET.PROPERTY:*

     JSON = ""

     RTN.STATUS = UDOSetOption(UDOOPTION_OUTPUTMODE, UDO_OUTPUT_COMPACT)

     RTN.STATUS = UDOCreate(UDO_OBJECT,udoObj) 

     MAX.ROWS = DCOUNT(PARAM1,@FM)            

     FOR X = 1 TO MAX.ROWS           

        RTN.STATUS = UDOSetProperty(udoObj,PARAM1<X>,PARAM2<X>)

     NEXT X

     RTN.STATUS = UDOWrite(udoObj, UDOFORMAT_JSON, JSON)

     RTN.STATUS = UDOFree(udoObj)     

     RETURN.ID = JSON

     RETURN

Our main entry tool web browsers get updated every 6 to 8 weeks. When they do update there are two things that always change for us such as JavaScript and CSS language support. It took 7 plus years for Firefox to fix a problem with the cursor moving to the URL after an AJAX call instead of the next column in the data table grid. Of course, this worked in Chrome but we had to put in a dead function call to not lose tab support to create a workaround for our Firefox users. Nevertheless, you have to read the developer notes to see what is new, what is changed, what is fixed, and what is no longer supported.


Somewhere around 2016 ES6 JavaScript language brought arrow functions also called fat arrows. They are used to help in writing concise functions. It took a bit of practice to understand what they can do for you. Nonetheless, there was some push back from clients and staff asking why would a programmer go into working code and change just because JavaScript had new features. Again, they are not wrong but the why is important here.


The word that describes "fat arrows" is that they are concise. Why is that not a good thing? Learning new things can introduce bugs that have been routed out. Maybe since some of this code was written in the early 2000's it could use an update and the next set of programmers that would not roll their eyes when they talk about this old code if it is constantly updated as standards change. Below is a sample of old and new code.


oDrivers = [{"id":"1","value":"Unitas"},{"id":"2","value":"Brisco"}]

// Old Code

for (var i=0;i<oDrivers.length;i++){

if (oDrivers[i].id==DriverNo){

driver_name = oDrivers[i].value;

}

}

// New Code

var driverItem = oDrivers.find(obj=>obj.id==DriverNo, true);

driver_name = driverItem.value;

If you are not willing to learn then maybe it is time to retire from programming. Or you could look into another profession that requires less continuous education suggestions. Or if you are so inclined you could get promoted to management. See the Dilbert Principle for more informed comments on management style and substance.

Bad Actors Story

Bad actors are not the ones on television or movies, although I can quite name a few since I am a "B" movie junkie. But I digress a little bit. Bad actors as explained in this article are the ones trying to breach your webserver not matter what kind of firewall you have. Once in your system, they want to steal your data and or encrypt your files. Then, because they are bad actors, they want to charge you also called ransomware to get your data back and or system unencrypted. Or if they are really bad actors they may release your data on the internet or send it to your competitors. Some of these bad actors do what they say and return your system back the way it was. Some of these bad actors do not encrypt your system after you paid and demand more payments before they might decrypt your system. Some of these bad actors take your money sell your information on the web for more profit. Unfortunately, you cannot tell what type of bad actor will take over your system and whether you will have a positive outcome from them no matter what action you take. Since I am the cloud site network administrator of ill repute. I see a lot of these attacks and a daily basis. WordPress, PHP, and many others are easy vectors into your webserver. Just recently I had to update our webserver 4 times because of the log4j vulnerability. It seems log4j version 2.14, our original version needed to be replaced by version 2.15. Then log4j version 2.15 need to be replaced by version 2.16. Then log4j version 2.16 needed to be replaced by version 2.17. And finally, version 2.17 needed to be replaced by version 2.17.1. I did not see the article that described the log4j vulnerability until Dec 11, 2021, two days after the problem was announced. By then I had recorded 11 failed attempts by bad actors on our web server. I am constantly restricting IP addresses based on what I see them doing or trying to do. Whether these bad actors are from China, Russia, India, Singapore, North Korea, or even the United States, my external-facing website must be protected from these bad actors. So one holiday night not long ago, it was dark and gloomy from my workstation window. For some reason, the office light was not to be shinning on my back today, but I was fully illuminated from the glow of my two 27 inch monitors when I spotted these log entries from our external facing website. I edited them to fit this snippet box: [02/Jan/2022:17:28:10] "HEAD /?xHAPPY-NEW-YEAR-FROM-DC8044.COM HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............................. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x..............A............... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............dXb.............. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x..........dXiXXdXXb........... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x........dXXOXXXXdXXib......... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............dXb.............. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x..........dXOXXXXXOb.......... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x......dXXXXiXXXdXXXXXXb....... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............III.............. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............III.............. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............................. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x...Follow.us....t.me/DC8044... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x...WEB...........dc8044.com... HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x.............................. HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x HTTP/1.1" 302 [02/Jan/2022:17:28:10] "HEAD /?x HTTP/1.1" 302 -- I don't to whether to commend this person and or company who wasted a lot of time sending me a "Christmas" tree 7 days after Christmas. Or maybe I should commend myself for actually looking at the logs and deciphering what was sent? I am very conflicted on this, but these are definitely bad actors because their website has the words: "Hack All The Things". Or should I be surprised that dc8044 is a hex color composed of red, green, and blue? This should be a warning to all of the companies and personnel to be very careful about who has access to your website. This stunt by this company may look innocuous but its players are "Bad Actors".

Sunday, December 12, 2021

XLr8Tools Update to fix zero-day exploit.

 There was a zero-day exploit of a Java library we use call log4j in our XLr8 Tools for Unidata and Universe databases. We have been using that library without incident for 17 years give or take for logging our Java errors. Nonetheless, here is an article that explains this exploit better than I can from PCMAG, enjoy.

Here is our changelog:

v4.17.2 - Dec 12, 2021

  XLr8Developer removed window.changed option since it is not used in Webix

  XLr8Developer added textarea height and width option to size boxes for this Webix control

  log4j update from 2.14 to 2.15

  

v4.17.1 - Nov 18, 2021

  XLr8Installer an option was added to force the creation of a directory file if the file does not exist.

  XLr8Commander right-click option was grayed out in error and is now working.

  

v4.17.0 - Nov 10, 2021

  XLr8Dictionary option added to display on the console dictionary editor reads, writes and compiles.

  XLr8Dictionary editor "Save and Compile Selected" button and menu option failed to write selected items and has been fixed.

  

v4.16.7 - Nov 08, 2021

  XLr8Commandinterpreter was renamed to XLr8Commander in all Java source points.

  XLr8Dictionary editor will no longer show null ids items that were causing errors in display and removal.

  

v4.16.6 - Nov 04, 2021

  XLr8Dictionary editor did not show I-descr that did not match internal values.

Tuesday, August 3, 2021

It was a good idea at the time


 Creating an HTML page with embedded JavaScript was and is still more art than science. Invariably we ask ourselves many questions:

  • Does the page render fast enough?
  • Do we have too many images that are slowing the load time?
  • Have used the correct code and syntax that runs optimally?
  • Does this form enhance the user experience or detract from it?

Having created code back in the early 2000s when HTML and JavaScript were very new, a lot of the syntax and the way things were done back then have changed. But the real question to ask is are we adapting to the new syntax or stuck in our ways?

We unfortunately until COVID-19 reared its ugly head most of us did not have the chance to evaluate if we need to change our coding style and syntax. With an unlimited amount of time and clients that no longer asked for constant changes, we changed our Javascript library from what we had been using for about 8 years to another one called Webix.

About 400 forms need to be updated to use the new library. Our code is program generated, so our driver program needed to be updated to generate Webix code. Moreover, all of the custom code written for the other library had to be adapted to the current library. A lot of code is dynamic so there are many things we need to do with the HTML DOM tree to finagle it so that we get the result we are looking for.

After getting all of these things changed, tested, and released to our customers we thought life was good. Then one of our clients pointed out that they were getting Violations in Google Chrome: "[Violation] Avoid using document.write()." Sure enough, when we turned on the developer tools it was there with this link. The thing we took away from the article was: "With this data in mind, Chrome, starting with version 55, intervenes on behalf of all users when we detect this known-bad pattern by changing how document.write() is handled in Chrome...[t]he script in the document.write() is parser-blocking..."

This technique is how we were able to add dynamic code to our static pages. For instance, if you were using the material UI and wanted to change to Webix contrast UI, we would have to change the form code to the correct cascading style sheets to handle those color and interface changes. On average, we had about 3 document.write() per form. The total hit for rendering the page was about 100 milliseconds according to Chrome. That means we are waiting for 1/10 of a second for Chrome to handle 3 dynamic code links. That is really bad.

It took a few days to digest what this meant for our code generator changes and updating all of our custom code where needed. Next, we need to figure out what code would work since our "Pacer" code would have to be replaced. We search the internet and found this JavaScript code. Of course, we did not use it exactly as they had but someone our staff had already written a dynamic link load code in our standard toolset. Our code generated has been updated to call the JavaScript function and the code has been tested and released to our clients.

Although we are pretty proud of our come, our clients did not notice that the forms loaded any faster. Nonetheless, we celebrated with another toast to code from the 2000s that should have been updated and removed as least in the year 2016 instead of 2021. Oh, by the way, our CEO owned a Pacer back in the day!


Tuesday, May 25, 2021

Programming in the 18th Century

Are we cutting the trees down with axes or two-man saws? Are we removing the bark with a draw knife? Are we making a log house to minimize our effort? Are we making lumber from a water-powered sawmill? Are we using a solid 12-inch iron hammer? Are we using iron nails?


These are all of the questions I have been answering for some 40 years of developing software in the multi-value world with our piss poor toolset and lack of quality tool vendors.


To refresh your memory a little about multi-value tools here we go. Using AE/ED line by line editor that one of my clients likened the editor to DOS Edlin. My personal favorite is using the editor ED in D3 and forgetting to flip the buffer so the changes did not take. Using UniQuery/RetrieVe syntax at a telnet prompt and my client thought I was using a variation of SQL. I was unable to add a logo to a bunch of forms in UniBasic, but I was proud that I could get it to print out on a laser printer on their network and the client was not impressed.


Our current database vendor has not bought any tools from vendors in quite some time but believes that they can create them from scratch. Their Visual Studio editor is half-baked, cannot compile code, and is missing the majority of features that no other tools vendor would get away with saying wait for the next release. Their front-end developer tool allows you to expose RESTful services to whatever framework you use to replace your telnet framework.


The problem is that most of the programmers using multi-value are over 40 years if not 60 years old. After you get over 40 years old you don't want to learn a new framework let alone these new-fangled tools built by database engineers that have not coded an application ever. Moreover, those programmers work for companies that have milked the multi-value technology for years and think why should I spend money where they cannot see an ROI.


I started developing tools 20 years ago at U2logic that some of my employees and the corporate staff were a mistake. They were somewhat right. The tools: database Editor, database software installer, database web developer, database resizer, database report writer, and database middleware were never a commercial success. However, what they did allow was a small company to develop web-based software that was innovative, pretty, functional, and damn near bug-free.


Our clients say can I have this report with these columns, these break-points, and with this heading with of course a logo. Using open-source BIRT running under Eclipse IDE with our database hookup, that report can be produced anywhere from minutes to days instead of weeks as before. And should the clients want the report in PDF, XLXS, DOCX, or HTML format, we write it once and BIRT uses emitters to produce those requested outputs.


Using Eclipse IDE running our UniBasic editor, a program can be changed and compiled in seconds without knowing how to FTP or what network drive we need to move the source code to. Our XLr8Editor allows you to see your compiler errors as you type which makes debugging the code much faster than the current solutions offered by our database vendor. Since all of the UniBasic code is indexed you can what routines you have already written that might accomplish this task without consulting an external document.


I could go on but you should see the point: Let's move out of our the 18th Century mindset with tools for our present day, or we do not and hope our programmers never die or retire. Either way, one of us will be coding faster, prettier, bug-free, using web interfaces, and have happy clients while the other is still flipping the frigging buffer.

Monday, April 5, 2021

From Telnet to Web: A Short Story

Let's go through a brief history of moving to the web through our eyes. Of course, we only used Unidata back then. U2logic was a VAR for Unidata the company. Nearly 100% of the work we did back then was to maintain Telnet applications (green screen) and enhance them. Today 100% percent of our work is Web-based application development. 

We starting looking at going to the web in the late 1990s. There was not much in the way of tools or technique. It was tough to get any traction until we found an ISP that would host our site. We created the site using HTML and a little JavaScript. By the way. Cascading Style Sheets was just invented and we could not figure it out so we embedded style in the HTML. We had a CGI interface. We read information from a flat file and posted it from our database to the web and read back the data to our database. 

We found Redback back around 1999. Redback only ran on Internet Explorer version 4 using the Microsoft web server. The Redback code was kludgy and our code was even worse. Nonetheless, we starting learning how to talk to the Web and how clients would react to entering data and running reports. 

Shortly thereafter Unidata replaced Redback with Redback Open containing Redback Objects (RBO). This time we had an executable that we could talk to our database. RBO’s were a major step up when communicating with our database. Nonetheless, the problem was all of the code we created with Redback we had to throw away. The two systems were not compatible. Well, that did not stop us. We converted most of our applications to Redback RBO's.

There were a few severe problems with Redback RBO’s. Redback required us to restart our Microsoft web server at least once a week or it would just stop working. We had to run a manual purge to clean up temporary files that Redback created because the Redback garbage collect did not delete all of the files and would continually slow down.

One of U2logic's staff suggested we write our own middleware to solve Redback’s issues. We thought the idea was crazy, but what the heck. Though and behold around 2006 we created U2WebLink which supported Unidata and Universe. This software used the same ideas as Redback's RBO. U2Weblink middleware which was written in Java ran using UniObject for Java and Apache Tomcat as the webserver. We got to keep most of UniBasic code, HTML, and JavaScript a very surprising fact for us all. 

Today we are still using U2WebLink. The current version runs on Java 15 and Apache Tomcat 10. Moreover, U2Weblink supports an open-source reporting tool call BIRT from Eclipse.org that can produce PDF, HTML, DOCX, and XLSX output. We developed an API that allows us to call UniBasic Subroutines without creating an object for interface purposes. U2Weblink is highly scalable and has been tested with up to 15000 users. Since we built our monitoring system from within it does not take up any noticeable resource and gives you a picture of how the system is running. We stopped trying to develop our own JavaScript library routines back in 2008. Currently, we use a JavaScript library called Webix.

Monday, October 26, 2020

Telnet to Web: A selected example

 There has been a lot of talk over the years of how to get your telnet applications to the web or at a minimum change the user interface (UI). I have lost count of how many times my database supplier Rocket Software for the last 10 years and IBM before them have told me how easy it would be with this tool or that tool to do this. Most of those tools are long since gone and replaced by others every time I see a new demo or “training seminar” from them. Every example that is shown is so simple you have to wonder why is this so hard. Then it dawns on you that have are just showing text boxes, images, or other uncomplicated things.

There is a simple example that I will show you what I mean. Almost all telnet applications have user input and programmers need to verify this against a code file to get verifiable data. For example, the users enter an employee type code such as “DW” for dock worker or “FO” for forklift operators. We verify that “DW” or “FO” is in the code file before we let the user go to the next prompt in a telnet program. All the user sees is an empty box in that type of UI. The backend software is doing all of the work and telling them if the data entered is correct.

On the web, we change the plain area to a select box. A SQL/SELECT statement is written to select all of the records in the employee type file and display them to the user. That way you do not have to keep verifying the data every time the user types in the UI because you have allowed only valid data that can be selected.

The first complication sets in if this field allows no value you have to change the select to have “Pick-a-Value” or “Please choose” that equates to no value. This means you cannot easily select all of the values from the code file because you need to prepend a null value onto the list and must do this programmable. You can do this with UniBasic code in our database or using a function in SQL to concatenate on to your select.

The second complication sets in because once the user sees this UI, they want it to autocomplete. Oh really, that was not even how the prior application even worked. Welcome to the web because those users have spent time on Google, Amazon, eBay, and others to name a few and they work that way so why does not yours. Of course, the JavaScript library tools I use to support these select types: select, combo, multicombo, multiselect, and richselect. All of those types all have additional options that will keep you busy for hours.

The third complication sets in because the code file you have is not as simple as employee types. This file, for example, is customers in which there are about 100,000 records. You cannot have a 100K select box that would be awful to load and be unusable. The solution is called lookups which are concealed in the text box in the right or left corner with an image of a magnifying glass. After the user presses the UI magnifying glass they are presented with a table of the first 15 to 20 values. The bottom of the form has page numbers to show you how many pages there are or just shows a left arrow on the left and a right arrow on the right with a few page numbers in between that is called pagination.

I have completed a few complications about SELECT HTML code boxes that can have lots of complexity. There are many other issues that were glossed over in many of those demos I saw and you may have seen as well, while this article has taken the time to show you one piece of this web-based UI puzzle that hopefully shows you what it takes to complete just one specialized prompt.

I have just finished an upgrade from our prior JavaScript library to a new JavaScript library that changes our entire UI. There is a lot to learn even for this old dog and SELECT boxes were just one of the many different UI choices that were made during the upgrade.

Thursday, October 26, 2017

Software is all about compromises

The client wants this function or the client wants that function. Your staff says this new cool JavaScript library will save you time and money. Your staff says if you buy this tool you will be able to do amazing things with it. You find out that you nobody on your staff has the expertise that you promised a client you could do. Let's take this one by one and see where they lead
This function the client says their software needs are based on what? It could be their competition has this. Or the CEO saw this in a premier business paper and tasked the client to get it done who called you. Whatever the reason, the software company must look at maybe this is a need that can be filled later without impacting the current timeline. Maybe if you don't architect this into the software, you will be delivery the software on time and in working condition.
Every tool that gets released the staff says the same thing: with this tool or software package, we will save lots of time and money. Anyone remember VB4, dBASE4, ACT2000, or some other acronym software that has long since died. Look for tools and databases that are stable that have been out for a while that may not be the best in class but they are backed by a good company and still have updates.
When a client asks you to write a PCL driver. Of course, we all say yes even though no one in the company has ever written a driver before. Then when the client gets the bill, you have to explain why it took many more months and cost 400% more. Only write software in your comfort zone you will be happier and your clients will be too.
No one can foresee the future yet, so it becomes apparent that you must look at each new idea with a grain of salt. Always, ask the stupid questions up front rather than explaining to your client that this project, database, and or tools you picked cause us not fit your client budget or timing.

Thursday, July 20, 2017

Technical Debt: BS or Real?

What does this term mean and why should I care? "Technical debt is a concept in programming that reflects the extra development work that arises when code that is easy to implement in the short run is used instead of applying the best overall solution." (See https://www.techopedia.com/definition/27913/technical-debt). You should care because the C Suite crowd thinks the code you created ten or twenty years ago suffers from this ailment.
First Technical Debt is not fixed by refactoring. If you are refactoring your source code which means you are restructuring the code without changing how the world interacts with it, does not have anything to do with technical debt. When source code is refactored your code should be more readable and more maintainable.
Second, Technical Debt is not Technical Savings either. It is said you can accumulate Technical Savings by investing extra time with your code to make those lines of code more readable and maintainable.
What a minute here? Both of the above paragraphs are saying the same thing with different words. Is Technical Debt just technical babble? Yes, in my opinion, it is just another take on spaghetti code, GOTO's in UniBasic, nested if's, and many other reasons why old code is not good code.
Just the other day one our clients looked at a routine that was written in 1984 (Great Year!) and thought it should be re-written because of the age of the code. When this code was written years ago there was no conscious effort to implement this quickly when there might be a better solution if the code was more thought out. This code was well thought out or it would not have lasted 33 years.
A lot of companies are saying you have accumulated Technical Debt on your source code to get your to switch platforms, databases or whatever. Stop letting those people tell you what your code is or is not doing when they do not have a clue what it does.

Wednesday, August 24, 2016

Happily Waiting for Reports, Not!

In a former life I was a user in between stints as a programmer. Although I would say the experience taught me humility and respect for those programmers who I requested things for, I would be lying. Every time I would ask the programmer why this report was taking a lot of time, the response would invariably be: "Do you know how much data you are requiring me to sort through to get you what you wanted?" Of course, I played ignorant and said: "It just a few million records, it should not take hours."  The next reply from the programmer was: "If you think this is so easy, why don't you write it yourself!"

A year ago I was helping out on a simple report that should run in a few minutes. It took 1 hour and 40 minutes to run an accounts receivable aging against 2 million plus records. First I looked at the select and found it was taking about three to five minutes to get all 2 million records. I changed the select to use alternative keys and reduced the criteria to select against.  Those coding changes reduced the select time to under 3 seconds.

The code that processed the data was building JSON arrays that are passed on to the open source report writer from Eclipse.org called Business Intelligence Reporting Tool (BIRT). Building those arrays took about 1 hour and 30 minutes using a standard UniBasic code structure of appending to a dynamic array. I could not change the code to a dimensioned array because the size of the report varies from 1 pages to over 4000 pages. I tested it against my better judgement with a dimensioned array that would cover a 5000-page report and it did run in about an hour. 

There is a relatively new structure in UniBasic called UDO which stands for U2 Data Objects. I created the JSON arrays directly using the UDO function calls. The time to process the data was down to 50 seconds. Wow, that was more improvement that I had anticipated. Our BIRT report in production finishes in a little over one minute.

Maybe your programmer is right that it takes hours in today's world to process large amounts of data. Or maybe your programmer is using outdated coding technique that can be improved by being a lot more knowledgeable.

Saturday, May 28, 2016

The Feedback Loop

When we hired a new employee a few weeks back, we always talk how U2logic is customers service oriented company. U2logic develops many types of applications and tools and we believe in the constant feedback loop between ourselves and our customers.
Years ago we tried to writing our own ticket tracking system. We spent a lot of time and did not get it right. We abandoned that project pretty quickly and went back to having our customers email or call us with issues. We would then figure out if the problem was code related, data problem, or a training issues. If it was one of the first two we would send off an email to our customer explaining the fix. If it was a training issue, we would try to email the steps to fix the problem or worse case talk them through it on the phone.
We knew our email/phone system was very marginal at best so we began to look for alternatives. We found JIRA Software the Issue & Project Tracking for Software Teams from Atlassian. We slowly started implement the features and feedback we wanted and got our staff familiar with the product. We bit the bullet and added our customers to their respective projects.
Wow, this was a surprise in how much our customers want to be part of the process. We get many request per day for problems, questions, or new features. Sometimes the response looks overwhelming to our new employee's but we love the feedback good or bad or indifferent. Our new employees think we bend over backwards for our customers, we hope they feel the same way as we are creating fantastic software.

Friday, April 15, 2016

Pebble Theory of Coding

There is a story of a man on a beach trying to figure out how to move just these large pebbles scattered all over the beach and leave the sand. This man can get a big front-end loader to remove all of the rocks.  Or this man can hire 100 helpers with wheel barrows and remove the rocks one a time using manual labor. Or, lastly, this man can remove several rocks every time when he visits the beach.
Most programming problems are based on the pebble theory of coding.
We can buy a very expensive tool to look at code to find our problems as well as help us develop code. This tool's purchase will have to be justified as to why it is needed with management which will be an arduous process. This tool will do the job but might report back false positives during code review.  Additionally, this tool may have a huge learning curve that will cause very few programmers to take the time to learn and use it. The question remains: is the beach, in this case the code, still usable.
This is what large or small shops do.  Given the size of the programming project, they may hire 10 or 100 programmers to do this task.  They give them cheap or open source tools to do the job because they have spent the money on labor. The project gets done in a few months or years depending on management changes and direction. The question remains: is the beach, in this case the code, worth the labor cost to get it done.
A single programmer over the history of programming has always created better and more innovative code than groups. Part of the reason is that a single programmer does not have group focus but a single focus on the task at hand and is able to get from point A to Z via D and M rather than going through the whole alphabet. Even this singularity may produce bad results or incomplete code but on balance should produce a better software product because their is only one person to blame.  The question remains: is the beach, in the case the code, worth it since the code might be much smaller and consistent.

Moving from Telnet to Web the Truth Revealed

Moving from a telnet based interface to a GUI like a web browser is always a tough decision for most U2 shops. However, most vendors sometimes "Lie by Omission". Let’s take apart the decision and talk about what the other vendors say or don’t say about this processes.
Web browser interfaces is slower than telnet. When your people can open several browser tabs to see information that would take them multiple enter keys to find in telnet that argument can be rendered moot.  The other issue is data entry speed is better in telnet. If you have written the user interface (UI) in JavaScript, there is no latency speed issue to go to the server because most of the data entry correction and verification is taking place on your web browser. For the most part, your vendor can, with a lot of work, negate this issue.
Converting from telnet to web is quick. Most if not all of your logic in your programs is based on receiving information from each telnet prompt. No web interface works like that.  At U2logic, we try to send either an entire multi-valued line of information at once or the full screen to do the database integrity testing at the database level. The logic of your programs for a different UI’s means removing a lot of code and restructuring the flow to be more batch mode instead of interactive mode which will take quite a lot of time to get it right.
Web programs will save you money in the long run.  This one is very true. Once you have made the jump to a web browser your business can grow without the need to hire more people because of productivity gains.  Additionally, when turnover happens which is expensive, you training time is significantly reduced for those new employees.