There are lot of programming languages available. The famous one is Python, but Java, C# and Go are also looking powerful. For writing a software prototype, the Python language is perhaps the ideal choice. Its available in Linux and Windows both and can be used to create all sort of apps and scripts.
The main problem of Python is its performance. Especially for programming games the system is too slow. Even if precompiled third party library are used for example pygame, the framerate in python is too little. Its nearly impossible to write a fast scrolling racing game.
The next better choice over Python is C/C++. C++ is known for its complex syntax. Also the problem with C++ is, that every programmer invents its own programming style. The main advantage of C++ is, that it is much faster and the programmer has more control over the situation. Sure, C++ is harder to learn than Python, but compared to vanilla C and even compared to asembly language, C++ has to be mentioned as a beginner friendly language.
Its beginner friendly because the newbie can create with a low amount of code lines and with the help of existing tutorials a graphical demo like the following one:
// compile with g++ hello.cpp -lsfml-graphics -lsfml-window -lsfml-system
#include <SFML/Graphics.hpp>
#include <iostream>
int main() {
// init window
sf::RenderWindow window(sf::VideoMode(640, 480), "Hello world!");
window.setVerticalSyncEnabled(true);
window.setFramerateLimit(25);
sf::CircleShape shape(40);
shape.setFillColor(sf::Color(0, 0, 250));
sf::Vector2f position;
// game loop
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event))
if (event.type ==
sf::Event::Closed)
window.close();
window.clear(sf::Color(255, 255, 255));
window.draw(shape);
window.display();
// move
shape.move(1.f, 0.f);
position = shape.getPosition(); // = (15, 55)
std::cout<<"pos "<<position.x<<" "<<position.y<<"\n";
if (position.x>300) {
shape.move(-300.f, 30.f);
}
}
return 0;
}
In around 30 lines of code, a ball is shown on the screen which is moving from left to right. The source code compiles into a 24kb large binary file which can be created for Linux, MacOS and Windows. Also the file will need only a little amount of cpu ressources and runs more efficient than the python version.
Sure, the source code looks compared to the python version a bit messy. The programmer has to manual care about many things and it is hard to understand what the code is doing. But for writing a production ready app, C/C++ is the prefered choice. There is no programming language available which can replace this well known and powerful C dialect.
July 21, 2023
Is C/C++ really a bad decision?
July 16, 2023
The ISA VGA card has made the PC a success
In the 1980s, many 8bit and 16 bit computer systems were available. The most successful one was the Commodore 64, and in addition there was the Amiga 500 and the Atari ST. These systems were sold for a moderate price and were equipped with mid range graphics and sound capabilities. The period of home computers ended at a specific year which was 1991. In this year, the VGA card for the IBM PC were introduced to a mass market.
On the first look the ISA VGA card doesn't look very impressive. But it was the major cause why the IBM PC has superseded the former home computers. The VGA mode 13h provides a resolution of 320x200 pixels with 256 colors. This spectrum makes games looking the same like on an arcade machine. In addition the VGA mode provides a better gaming experience than even on the Amiga 500.
Before the invention of the VGA mode, an IBM PC provided only a low amount o colors in the CGA resolution. CGA games are looking poor compared to the Commodore 64. In other words, the decision for or against a certain computer system is made in respect to the graphics card adapter. The VGA card was a revolutionary technology which allows to use an IBM PC as a gaming machine. It is possible to use the mode for creating well looking games. Here is a comparison table from the early 1990s:
Commodore 64 (1982), 160x200 with 16 colors
Atari ST (1985), 320x200 with 16 colors
Amiga 500 (1987), 320x200 with 32 colors
IBM PC, VGA resolution (1991), 320x200 with 256 colors
May 31, 2023
Creating beautiful papers with LaTeX
May 21, 2023
Advantages of a wall of text
May 19, 2023
Wall of text, or: the beauty of LaTeX
May 18, 2023
The meaning of LaTeX
Why LaTeX is great
May 04, 2023
LaTeX revisted
LaTeX is known as the standard tool for academic publication and lots of online forums and external software is available in the ecosystem. The main problem is, that the promise of LaTeX isn't matching to the reality and the following blog posts explains in detail what the problem is with LateX.
Let us start with the main claim of the TeX ecosystem. The self understanding is, that the output quality of LaTeX exceeds possible alternative programs especially MS-Word. The interesting situation is, that the measurement how to judge about MS Word vs. LaTeX is not given. To make the situation more realistic let us take a closer look at a pdf file generated with LaTeX.
The surprising situation is, that such a latex pdf file doesn't contain of PDF tags, also the file isn't working with the default Postscript fonts which are times, helvetica and so on. And last but not least, it is impossible to convert a pdflatex file back into the HTML format or read it aloud with the Jaws screenreader. In abstract words, the latex created pdf file has no accessibility at all. And there is a reason for this unusual behavior.
At first it should be mentioned, that this problem can't be fixed by simply adding a certain parameter or adding a new latex package. But it has to do with the self understanding of LateX that all the pdf documents are not accessible. The reason is, that LaTeX is some sort of advanced printer driver. Its main purpose is to generate a bitmap picture like a TIFF image which has a well defined size and a well defined position of each pixel. It is not possible to zoom, to scale or to convert the image into another format but the image is static.
This kind of behavior can be explained with the origin of LaTeX. Ine late 1970s LaTeX was a pro-processor for offset printing devices. These machines need an image as input and the objective is to print this image in a high amount of copies. This makes LateX a great tool for creating newspapers and printed journals but at the same time it is a poor choice for creating office documents or HTML pages.
Office documents and HTML files are operating with different assumptions about the reality. They are not assume a fixed size A4 paper in the target output but the assumption is, that each user prefers a different size. The same HTML file gets rendered to a smartphone display, can be printed on US Letter page or gets rendered on a desktop screen. Such kind of flexibility is not available with LateX.
The LaTeX community ignores the problem. The users are assuming that there is not need to read aloud a latex file in jaws, and they are assuming that every pdf file gets printed. This assumption was working fine in the 1980s but it produces a reality gap in the 2020s. Most internet traffic isn't generated by desktop users but smartphones are the preferred display devices. In addition it is very important that a pdf document can be converted into other formats like HTML because the user likes to render the information by its own.
The only thing what LaTeX can do really well is to provide a static image which contains of justified text. It looks like it was scanned from a book created in the 1960s and the LateX community assumes that this format is the only valid layout.



