Tuesday, December 23, 2014

CodeAnywhere, (thumbsup)!

I started some mini javascript project of my own, so needed to create a relatively simplistic development environment.
However, this environment has some constrains:
- it should not require install (portable to many different devices),
- it should connect to my Dropbox account.

For that purpose, I came across CodeAnywhere website, where you can for free set up your account and connect your dropbox account and immediately start working. However, the internal browser that they have is running through their proxy, which causes a number of issues for my javascript development, so I am not using it.

Friday, December 19, 2014

What makes SAS Enterprise Guide not a mature application ...

Ok, before I start expressing my opinion about SAS Enterprise Guide and SAS Base Programming, I would like to make a quick introduction of my technical experience and expertise.

Throughout 7-8 years of my professional life, I have been using in great extent software tools like MATLAB, and have been programming enterprise applications in Java/Spring. In last 6 months I am introducing myself to SAS World.

Version I am working on is SAS Enterprise Guide 9.4. For a system that still uses programming model (SAS Base) of 80s, a graphical interface which visually shows how the process is being executed is a great refreshment. There are many options on dealing with data and doing analysis on it, making it very comfortable tool to easily build a large data manipulation process.

Basic Application use issues:

  • "Object reference not set to an instance of an object".
    • It relatively often happens (every 4 days of 8h daily use of SAS Enterprise Guide) that the file you think you saved ends up to be corrupted. You open the saved file, and during the load above quoted message comes up, which makes you not being able to see the project tree, rendering this project file completely useless. You might have some chance, if the project is not too big, to refresh the project tree, and that it actually brings you back the project tree, but bigger the project gets (more process flows you create), less chance you have of any recovery. This errors would be completely fine, if a error message would be shown if something during saving process gets wrong, but there is no such message, leaving you only to wonder if you really have saved your project properly or not.
  • the first created Query Builder node on a newly created process flow suddenly jumps into some other process flow.
    • This annoying issue is happening usually when you want to address a table you used in some other process flow. Even though you have the new process flow currently open, and that you when to Tasks->Data-> Query Builder, if you chose a table referenced in some other process flow, it will (automatically) jump into that process flow. If you have referenced multiple tables referenced also in different process flows, the destination of the "jump" is at random. The worst part of it all, it does not get selected and automatically shown once it jumps, so if you dont know about the "jumping" behavior, you will think something went wrong, and will start building a new one again. It happened to me couple of times, even if I knew this issue, to be distracted and build the same node again. Couple of hours later, you just realize you have some junk created in the process flow you haven't even worked on...
  • Deleting nodes sometimes ends up in deleting the whole process flow. 
    • It does happen very seldom, but often you want to delete one step in between of the flow you created, it deletes not just all nodes that are directly dependent on its result, but also every node on the process flow.
  • Waiting for Godot
    • when you run a number of tasks, queued one after another, it does happen that the Queue Controller does not receive the "finish" signal from previous task, and simply does not start the next task. However, the finished task is being even cleared from a Task Status list, so the first in queue task waits literary for no task...
  • Edit-> Undo feature is only for text... no graphical nodes...
    • it does happen when you work long or get distracted, to accidentally delete a wrong graphical node. YES, YOU CAN'T BRING IT BACK. IT IS GONE. unless you have similar tick like me and save project every couple of minutes, so the process of "closing without saving and opening again" successfully replaces undo option.

General issues (or simply, why it is not there?)

  • A proper versioning system? Apache Subversion has been created in year 2000. 14 years exists a well functioning versioning system. Why SAS Enterprise Guide does not have that feature? By versioning system means working in parallel on a same project, with a possibility without any conflicts to work on different process flows. 
    • I read about SCM in SAS post, but this approach enforces you to use ONLY SAS Base code in your SAS Enterprise Project, because all the graphical implementation (main feature of SAS EG) is saved in .egp file. Now this is the funny part... the whole project is written in one XML file and in bunch of folders which contain log files, and all that zipped and renamed as egp file... option to do a versioning of that XML file would already be a big step further! Why it isn't done then?
  • SAS Base Code <-> SAS Enterprise Code? 
    • One is able to extract the code of SAS Enterprise Code, but there is no chance that the same exported code gets imported into a fully structured SAS project
  • Testing in SAS? 
    • Is there any testing method supported by SAS? Unit testing?
  • Design Patterns? 
    • I have read a paper (this one) which describes multiple design patterns using a sas macro language. As a initial C developer, my experience with macros is that having a dumb text-placing/no-thinking is extremely dangerous style of coding.
    • One can say
  • Is a "TRICK the SAS Base Language" a main solution to every upcoming problem?
    • Throughout development, often I had to google for some info how to do what in SAS, and it often turn to be the "trick" the final solution, which is actually some awful side-effect of existing SAS feature that then makes you do the job you need. For Example, creating a folder through SAS (let's say you want your reports to be placed in a folder tree defined by the business specification. Through a solution on this site it means, you have to make a meaningless librefs with specific option to create such a folder structure?). Now it makes me wonder... does it mean becoming a senior SAS developer means how many hacks you know???

Monday, December 15, 2014

Small C code to convert german text to old ASCII-DE encoding

I had a task to convert a UTF-8 or ISO-8859-2 encoding german text (names, addresses,...) into a 7bit ISO-646-DE (ASCII-DE) encoding. Since this encoding almost is non-existent, it was a bit difficult to find on Google search any example of such a conversion. I decided to be that sucker to write it :) I know this is not really the best code ever, but does its job.

Tuesday, December 9, 2014

Getting list of files from a folder in a text file

I keep always forgetting the exact parameters to use, and need to write this down somewhere :) It might also be helpful for others:
 In Windows:
WindowsUnix/Linux/OS X
dir /b >folderlist.txt
ls > folderlist.txt

and if you also want to see the subfolders with their full paths:
WindowsUnix/Linux/OS X
dir /b /s >folderlist.txt
ls -R > folderlist.txt