Considering Generalized 2D Translation Algorithms

Graphics objects can be generalized in a 2D graphics system in which operations to determine their position can be defined. I was using Inkscape recently to do a rough sketch of a login screen and thought about the placement of the elements in terms of computer code. It has been many, many years since I had to think about such things and I got to work on a general set of operations to deal with the translation of 2D geometric entities. The information was initially captured on the same sketch document that I also list in this article. The operations may be featured in updates to the article series I have posted titled, Build a Cross Platform C++ Program with SFML (currently up to Part 08 as of this writing).

Sketching 2D with Inkscape

Below is an export from Inkscape showing scratch work. The question was, given the objects represented here, what are feasible operations beginning at origin (-1,-1) that would result in the representations shown? The operations listed further in this article shows some plausible answers.
visualizing_2D_graphics_translation_operations_login_screen_design_sfml_related

Continue reading

One Drive API may Turbocharge Content Management

Microsoft has announced a One Drive API that can be used to post and access data on One Drive from within mobile apps and any software system that can access the Web. This is huge for those with non-sensitive information who hope to speed up the development of solutions that can access that information. One Drive, like Google Drive, becomes a universal file system accessible on the Web. The announcement is covered by VentureBeat.

It interests me because I once created a content management system from scratch that took me another 3 years to polish. That was a solution defined using Microsoft technologies and was effective for what it did. Although it was probably replaced with other solutions, it taught me much about Internet file systems such as One Drive, Google Drive, DropBox, and others. Continue reading

C++ auto type deduction between std::string and const char*

Effective Modern C++ is a book I reviewed a while back. It described the limitations of auto type deduction. One area where this deduction issue may easily surface is in the use of strings you may want to convert to char*. While it may be ideal to totally exit from the use of const char*, well, that is not reality. I was in the midst of making a block of code more generic so I didn’t have to repeat myself and happened upon an issue with std::string. error: member reference base type 'const char *' is not a structure or union Continue reading

Comments on Data Oriented Design – Part II

It is said that organizing data a certain way in a computer program will improve performance and reliability. This is what I learned reading the entire website dataorienteddesign.com written by Richard Fabian. You will find numerous advanced concepts discussed on the website including substantive critiques of object-oriented programming; a different view on design patterns; generative and transformative approaches and litany of thoughts on the design of programs that run faster but are more adaptable.

Most programmers who are familiar with data structures, assembly language, and computer architecture know about aligning data design in such a way to gain greater performance. Data oriented design applies that perspective more broadly. Instead of optimizing a small part of a module or deciding to use smaller primitive data types more appropriately, the data oriented approach implies structuring programs to achieve contiguous data processing from the start of the program to the end.

I think the reality is data oriented design is the adaptation of relational database design to computer programs. Make the code work like tables, columns, and rows in which case you gain higher cache locality. The performance is great but the obviousness of the code may seem less appealing than the comfortable taxonomic feel of class/object based designs. Aim for the natural performance I say but remember you have a higher cognitive burden because you are still in an imperative programming environment rather than using SQL. Continue reading

Comments on Data Oriented Design – Part I

Data Oriented Design is a concept I became increasingly curious about. I read various presentations from CppCon 2014 that discussed Data Oriented Design but it was not enough for me. I tabled the matter for a few months until I ran across a presentation by Sony. I was tentatively convinced that Data Oriented Design had worth. I needed to know more. I had an intuitive sense of what it was about. I mean, I studied Assembly Programming, data structures, and computer architecture and wrote my code in such a way that respected the machine. However, was there a larger viewpoint? I wanted to confirm my ideas of what Data Oriented Design was in order to transition from intuition to practice. What I found was that I had no idea what Data Oriented Design was, but I do now.

Richard Fabian has done an exceptional job detailing the concept. I found his work online and read the entire website, dataorienteddesign.com, that he produced. A compelling read. He fully explains the rationale, the application, and the reality of the Data Oriented Design concept. Applied to software development, Data Oriented Design, is far less taxonomic than Object Oriented Design. Instead, Data Oriented Design is more mechanistic and active. The goal is to create “inherent” behavior rather by reducing the amount of explicit control flow in imperative programs. The shape of the data determines how the program runs, what it does, and how well.

The website gives you many details about the concept. I think Data Oriented Design is probably the right approach to software development. I do not think that programming languages such as C++, C, C#, Java, similarly structured languages are the most practical languages for Data Oriented Design. Yes, people have found ways to apply Data Oriented Design in these languages, but there is much more you can do with Data Oriented Design than what C++, C, C#, and Java naturally allow. Continue reading

Impact of Linux Coding in the Mainstream

It may be early for me to say this, but the momentum behind Linux is such that in about 2 to 4 years, it may be the mainstream platform. You will not see a product called Linux on store shelves. Instead, it is the ingredient for the products. Current reports have an average of approx. 4,000 contributors to Linux. According to Ars Technica, about half of that 4,000 arose in the past year. A huge surge to be sure with Intel as the largest contributor by far.

Ars Technica reports in their article, Linux has 2,000 new developers and gets 10,000 patches for each version, that the Linux community is greatly expanding by implication. Most of those who work on Linux are getting paid to do it. That is an unforseen outcome that will go far to sustain steady improvement in the technology. Linux has become the foundational base technology for many things. On that note, it is time to look at the impact of surge of interest in Linux. Continue reading

Cloud for Front-end Web Tier

Harriette Halepis describes the right way to use the cloud for front-end web applications. The article is titled, Retail Customers Demand The Very Best — Hybrid IT Delivers, on Forbes.com and I agree with approach. It blends the security, process, and oversight advantages of in-house technology with cloud technology capacity. Rather than store business data on the cloud, simply use it to run those applications that are delivered over the Web.