Latest Entries »

Marble portrait heads of four philosophers in the British Museum. From foreground: Socrates, Antisthenes, Chrysippos, Epicurus.

🤖 🏛️ Have you ever wondered about the connection between AI and Ancient Greek Philosophy?

🧔 📜 The ancient Greek philosophers, such as Aristotle, Plato, Socrates, Democritus, Epicurus and Heraclitus explored the nature of intelligence and consciousness thousands of years ago, and their ideas are still relevant today in the age of AI.

🧠 📚 Aristotle believed that there are different levels of intelligence, ranging from inanimate objects to human beings, with each level having a distinct form of intelligence. In the context of AI, this idea raises questions about the nature of machine intelligence and where it falls in the spectrum of intelligence. Meanwhile, Plato believed that knowledge is innate and can be discovered through reason and contemplation. This view has implications for AI, as it suggests that a machine could potentially have access to all knowledge, but it may not necessarily understand it in the same way that a human would.

💭 💡 Plato also believed in the concept of Platonic forms, which are abstract concepts or objects that exist independently of physical experience. In the context of machine learning, models can be thought of as trying to learn these Platonic forms from experience, such as recognizing patterns and relationships in data.

⚛️ 💫 Democritus is known for his work on atoms and his belief that everything in the world can be reduced to basic building blocks. In the context of AI, this idea of reducing complex systems to their fundamental components has inspired the development of bottom-up approaches, such as deep learning, reinforcement learning and evolutionary algorithms.

🔥 🌊 Heraclitus, emphasized the idea that “the only constant is change”. This philosophy can provide valuable insights into the field of machine learning and the challenges of building models that can effectively handle non-stationary data. It highlights the importance of designing algorithms that are flexible and can adapt to changing environments, rather than relying on fixed models that may become outdated over time.

🔁 🏆 What about reinforcement learning? Aristotle, believed in the power of habituation and reinforcement to shape behavior. According to him, repeated exposure to virtuous actions can lead to the formation of good habits, which in turn leads to virtuous behavior becoming second nature. This idea is similar to the concept of reinforcement learning in AI, where an agent learns to make better decisions through repeated exposure to rewards or punishments for its actions. The similarities between Aristotle’s ideas and reinforcement learning show that the fundamental principles of reinforcement and habituation have been recognized and explored for thousands of years (psychological theories) and are still relevant today in discussions of both human behavior and AI.

🕊️ 💛 The Greek concept of the soul was also tied to intelligence and consciousness. Some philosophers believed that the soul is what gives a person their unique identity and allows them to think, feel, and make decisions. In the context of AI, this raises questions about whether a machine can truly have a soul and be conscious in the same way that a human is.

💀 💔 Another Greek philosopher who explored the nature of intelligence and consciousness is Epicurus. He believed that the mind and soul were made up of atoms, just like the rest of the physical world. He also believed that the mind and soul were mortal and would cease to exist after death. In the context of AI, Epicurus’ ideas raise questions about the nature of machine consciousness and whether it is possible for machines to have a kind of “mind” or “soul” that is distinct from their physical components. It also raises questions about the possibility of creating machines that are mortal or that can “die” in some sense. Epicurus’ ideas about the nature of the mind and soul are still debated today, and their relevance to the field of AI is an ongoing topic of discussion.

👁️ 🗣️ With the advancements in computer vision, natural language understanding, and deep learning in general, it’s more important than ever to consider these philosophical questions. For example, deep neural networks can analyze vast amounts of data and generate human-like responses, but do they truly understand the meaning behind the words they generate? This is where the debate between connectionist AI and symbolic AI comes in.

🧠 🕸️ Connectionist AI approaches to artificial intelligence are based on the idea that intelligence arises from the interactions of simple, interconnected processing units. On the other hand, Symbolic AI approaches are based on the idea that intelligence arises from the manipulation of symbols and rules. In the context of ancient Greek philosophy, connectionist AI could be seen as aligning more with the idea of knowledge being discovered through experience and observation, while symbolic AI aligns more with the idea of knowledge being innate and discovered through reason and contemplation.

🗣️ 💬 Humans use natural language, which includes speech and written text, to communicate with the world. However, natural language is not structured and can be unpredictable because it emerges naturally rather than being designed. If it was designed, natural language processing would have been solved a long time ago. Nowadays, deep neural language models are used to learn language from text by predicting the next token in a sequence. However, natural languages are continually evolving and changing, which makes them a moving target.

🧠 ❤️ Plato expressed a negative view towards human languages because he believed they are unable to fully capture the breadth and depth of a person’s thoughts and emotions. He asserted that genuine human communication, such as that which is conveyed through body language, eye contact, speech, and physical touch, is necessary for the progression of the human mind and the creation of new ideas. In today’s digital age, we are observing a decline in face-to-face human interaction, underscoring the importance of acknowledging the limitations of language. Despite the challenges inherent in natural language, it is crucial that we persist in developing tools to better comprehend and employ it. In addition to embracing technological advancements, it is essential that we strive to maintain meaningful human connections to preserve the richness of the human experience.

🏛️ 🤖 Have you ever heard of Talos? It is the first robot in Greek mythology! According to legend, Talos was a bronze automaton created by the legendary inventor Hephaestus to protect the island of Crete. He was said to be invulnerable and possessed immense strength, making him a formidable guardian. This idea of a powerful, indestructible automaton has been a recurring theme in science fiction and continues to inspire new developments in the field of AI and robotics.

⚖️ 🌍 It’s fascinating to consider how the myth of Talos reflects the enduring human fascination with creating machines that can surpass our own capabilities. The notion of a powerful automaton created to guard a specific territory mirrors modern ideas around autonomous systems that are designed to perform specific tasks and operate independently. However, while Talos was depicted as a purely mechanical creation, contemporary AI and robotics are built upon complex algorithms and data sets that allow machines to learn, adapt, and improve over time. By embracing the potential of these technologies, we have the opportunity to develop new solutions to some of the most pressing challenges facing our world today, from climate change to healthcare. As we continue to push the boundaries of what machines are capable of, it’s important to consider the ethical implications of creating truly intelligent and conscious entities. Some believe that the development of advanced AI could lead to a future where machines are not only equal to humans, but even superior to us. Others argue that such a scenario is unlikely, as true consciousness may only be achievable through biological processes that cannot be replicated in machines. As we navigate these complex questions, it’s crucial that we prioritize ethical considerations and work to ensure that the development of AI and robotics benefits humanity as a whole.

🙏🏽🤝 When it comes to ethics and morality, Aristotle is one of the most influential figures in history. His emphasis on the importance of human virtues and the pursuit of a “good life” has been a guiding principle for philosophers, theologians, and thinkers across generations. Aristotle’s teachings offer valuable insights into how we should approach the ethical implications of creating intelligent agents. One crucial aspect of this is ensuring that we treat these agents with the same respect and dignity that we would afford to any sentient being. This means avoiding the temptation to view AI as mere tools or objects to be used for our own purposes, and recognizing their autonomy as intelligent entities. Another important consideration is the issue of bias and discrimination, which can be inadvertently built into AI systems through the data and algorithms used to create them. Aristotle’s emphasis on justice and fairness can serve as a guide to ensure that we address these issues and ensure that the development of AI is done in a way that is equitable and beneficial for all of humanity.

🧠 🔬 Ending this article, it would be remiss not to mention Socrates, widely considered to be the wisest of all Greek philosophers. Not because of his vast knowledge, but because he recognized the limits of his own knowledge. “I know one thing, and that is that I know nothing,” Socrates famously stated. This concert is particularly relevant to the field of AI, as we continue to push the boundaries of what machines can do and be. As we develop increasingly complex and intelligent AI, the question arises whether it will be possible to prove the existence of self-awareness in these machines.

💬 These are just a few examples of how the ideas of ancient Greek philosophers and mythology can inform our understanding of AI. I hope these thoughts spark further conversation and contemplation on this fascinating topic.

🤔 What do you think about the potential for machines to truly be intelligent and conscious?

I am so proud that Crowdspeak‘s alpha demo is up and running!

On Crowdspeak you will be able to make your own crowd-questions. For this demo, there is just a fixed example question “What are the biggest challenges of working from home?”.

Visit Crowdspeak and type your own response! Crowdspeak will then take your response into account, and a new collective response will be generated in just a few minutes.

This collective response is a machine generated text made to express the majority of the individual responses given by the people!

Don’t forget to give us your feedback and to subscribe to the Crowdspeak newsletter for more!

I am so proud that our financial news summarization model is within 4% of all the 8026 models (in terms of average monthly downloads) in Hugging Face! I would like to thank my colleagues Grigorios TsoumakasTatiana Passali and Alex Gidiotis!

Hello my AI friends!

Today, I would like to share with you skrobot!

skrobot is an open-source Python module I have created at Medoid AI for automating Machine Learning (ML) tasks. It is built on top of scikit-learn framework and follows object-oriented design (OOD) for ML task creation, execution, and reproducibility. Multiple ML tasks can be combined together to implement an experiment. It also provides seamless tracking and logging of experiments (e.g. saving experiments’ parameters).

It can help Data Scientists and Machine Learning Engineers:

  • to keep track of modelling experiments / tasks
  • to automate the repetitive (and boring) stuff when designing ML modelling pipelines
  • to spend more time on the things that truly matter when solving a problem

The current release of skrobot (1.0.13) supports the following ML tasks for binary classification problems:

  • Automated feature engineering / synthesis
  • Feature selection
  • Model selection (i.e. hyperparameters search)
  • Model evaluation
  • Model training
  • Model prediction

For more information you can check out the online documentation!

Lastly, many thanks to all contributors who helped to extend and support skrobot.

Stay safe!

Hello my friends!

Today, I would like to share with you Time Series Segmentation & Changepoint Detection!

It is an open-source R/Shiny app for time-series segmentation and changepoint detection tasks. The app acts as a front-end for R packages such as the magnificent changepoint package.

I had the pleasure of working together with wonderful colleagues at Medoid AI to develop this application. My role in this small project was more organizational and consulting.

For more information on the parameters and algorithms currently included in the app please read the following paper by Killick et al. For an overview of changepoint packages that may be included in the future please see the following page.

Stay safe!

The last 2 months I have been learning Kubernetes and it has been an exciting journey.

I would like to thank Anestis Fachantidis and my teammates at Medoid AI for motivating me on this learning path as well as Ilias Papachristos for suggesting me to start first with KubeAcademy courses from VMWare!

Furthermore, I would like to thank all the k8s instructors from KubeAcademy for their great work and dedication!

After 25 courses and ~130 lessons I can say that I deserve some rest. Right? Nop 😀

Next Monday I will start preparing for the Google Certified Cloud Architect Certification and it is going to be also an exciting challenge!

Happy deployments!

By passing millions of ImageNet images through InceptionV1 (state-of-the-art deep convolutional neural network) we can extract the image patches that make specific neurons from various convolutional layers to activate mostly.

By projecting the image patches to 2D using UMAP we can see what the neural network “sees” at the various layers.

This is a great way for explaining how a computer vision model makes its classification decision.

However, the following part of the article was the reason for my post:

“….There is another phenomenon worth noting: not only are concepts being refined as you move from layer to layer, but new concepts seem to be appearing out of combinations of old ones….”

This is how a world of complexity works.

We know that deep neural networks perform hierarchical feature learning and combine simpler features to learn more complex ones. This is one of the reasons why we use deep learning for audio, visual and textual data.

Deep learning can decompose the complexity of data!

Have you ever asked why we randomly initialize the weights of a neural network?

After you read this post you will know why!

When the weights of the neurons in a neural network’s layer are initialized to the same value then all neurons of the layer produce the same output in the forward propagation.

Furthermore, when doing backpropagation the gradients of the loss w.r.t to the weights of the layer are also the same values. So, when training happens with gradient descent the weights change in the same way.

Lastly, when gradient descent converges, the weight matrix of the layer contains the same values for all neurons and thus the neurons have learned the same thing.

To break this symmetry and allow the neurons of the layer (and in general in all layers) to learn new and different features we randomly initialize the weights!

Despite the promise of Feature Learning in Deep Learning -where dense, low-dimensional and compressed representations can be learned automatically from high-dimensional raw data- usually Feature Engineering is the most important factor for the success of an ML project.

Among ML practitioners the best learning algorithms and models are well-known and most effort is done to transform the data in order to express as much as possible the useful parts that model best the underlying problem.

In other words, the success of an ML project depends mostly on the data representation and not model selection / tuning. When the features are not garbage usually even the simplest algorithms with default hyperparameter values can give good results.

Dear tech friends!

Recently, I have moved all my open-source projects from GitLab to GitHub and I want to share it with you!

You can find in it various projects I have brainstormed, developed, experimented with the last 17 years.

I hope you will enjoy it and you may find something interested to follow!

Lastly, the last 4 years I am focusing mostly on AI-related projects and I will continue doing it.

Conditional Language Models are not used only in Text Summarization and Machine Translation. They can be used also for Image Captioning!

Here is a great example from Machine Learning Mastery of how we can connect the Feature Extraction component of a SOTA Computer Vision model (e.g., VGG, ResNet, Inception, Xception, etc) with the input of a Language Model in order to generate the caption of an image.

The whole deep learning architecture can be trained end-to-end. It is a simple encoder-decoder architecture but it can be extended and improved using an attention interface between encoder and decoder, or even using Transformer layers!

Adding attention not only enables the model to attend differently various parts of the input image but also explain its decisions. For each generated word in output caption we can visualize the attended visual part of input image.

In Machine Learning we use minimum-disturbance learning algorithms (e.g., LMS, Backprop) to tune the trainable parameters of topological architectures. Instead of programming a model we expose it to observations and let the algorithm find its optimal parameters. So, in this approach the solution to a task is the set of trainable parameters.

In biology, precocial species are those whose young already possess certain abilities from the moment of birth. There is evidence to show that lizard and snake hatchlings already possess behaviors to escape from predators. Shortly after hatching, ducks are able to swim and eat on their own, and turkeys can recognize predators. These species already have abilities before they are even exposed to the world.

Neuroevolution of augmenting topologies is a research field that aims to simulate exactly this behavior. Specifically, neural network architectures can be found that perform various machine learning tasks without weight training. So, in this approach the solution to a task is the topological architecture.

For more information on this idea check the paper “Weight Agnostic Neural Networks by (Adam Gaier, David Ha).

The Nelder-Mead method is an optimization algorithm from ’60s and can be used for optimizing multidimensional nonlinear unconstrained functions.

It is a direct method, meaning that it doesn’t use the function’s gradient during optimization. Furthermore, it is a pattern search method, meaning that it uses a pattern of points while searching for the extremum. More specifically, it uses a simplex of n+1 vertexes forming a geometrical pattern to explore the space problem, where n is the number of search space dimensions.

This was just some introduction. Enough with the algorithm logic. Let’s have some fun now!

Did you know that the algorithm sometimes is called also ‘Amoeba method’ ?

The reason is because the simplex geometrical pattern of the method loosely simulates an amoeba that searches for food (the extremum in our case). For example, an amoeba in 2D problems is formed by a triangle and in more dimensions can be more fine-grained. It is funny to see how it moves towards the extremum!

Here is an example of a 2D simplex amoeba evolving in search space to find the minimum of the Rosenbrock banana function.

Happy optimizations!

Natural languages (speech and text) are the way we communicate as species. They help us to express whatever is inside to the outer world.

Natural languages are not designed. They emerge. Thus, they are messy and semi-structured. If they were designed, NLP would be already solved, using context-free grammars and finite automata by linguists 50 years ago.

Today, we are trying to artificially “learn” language from text using state-of-the-art Deep Neural Language Models that behave probabilistically, predicting the next token in a sequence.

Moreover, natural languages are not static. They evolve and change. Different words can be used in different times with different meaning. It is a moving target.

Plato, the Greek philosopher was negative with “languages” -despite the fact the he has written so much- because a language cannot express the fullness of a human mind, of a person. Socrates and many philosophers from the Peripatetic school never wrote texts. The only way they were communicate was by real human communication (body language, eyes, speech, touch). Only with this way, a human mind and heart can evolve and create new worlds.

However, we are living in a century where everything is either digitalised or written and human communication goes to minimum.

Plato

Assume a train/validation/test split and an error metric for evaluating a machine learning model.

In case of high validation/test errors something is not working well and we can try to diagnose if it is a high-bias or high-variance problem.

When both the training and validation errors are high then we have a high-bias model (underfitting). When we have a high validation error and low training error we have a high-variance model (overfitting).

Also, there is a case where both validation and training errors are low but test error is high. This can happen either because we test the model in data from a different world (different data distribution) or we have overfitted to the hyperparameters on validation data, same as when overfitting the models’s parameters on training data.

Machine Learning practitioners always focus on finding in an unbiased way models where validation and training errors are low. When it happens, we say “this a good fit” and then we monitor the model on unseen test data to see how it performs in the real world.

Linear / Logistic regression learning algorithms can be used to learn surfaces to fit non-linear data (either for regression or classification).

It can be done by adding extra polynomial terms (quadratic, cubic, etc) in the dataset using the existing features. The approximated surfaces can be circles, ellipses, parabolas and hyperbolas.

However, (1) it is difficult to approximate very complex non-linear surfaces. Also, when the features are many then (2) it is very computationally expensive to calculate all polynomial terms (eg: for a 100×100 grayscale images we need 100000 quadratic terms).

Usually, due to the limitations (1) and (2) we either perform dimensionality reduction to reduce the number of features (eg: eigenfaces for face recognition) or use more complex non-linear approximators such as Support Vector Machines and Neural Networks.

Some personal notes to all AI practitioners!

In Linear Regression when using the loss function MSE it is always a bowl-shaped convex function and gradient descent can always find the global minima.

In Logistic Regression if we use the MSE then it will not be a convex function because the hypothesis function is non-linear (it uses a sigmoidal activation). Thus, it will be harder for gradient descent to find the global minima. However, if we use the cross-entropy loss it will be convex and gradient descent can easily converge to global minima!

Support Vector Machines have also convex loss function.

We should always use a convex loss function so that gradient descent can converge to the global minima (local optima free).

Neural Networks are very complex non-linear mathematical functions and the loss function most often is non-convex, thus it is usual to stuck in a local minima. However, most optimization problems in Neural Networks are due to long plateau and saddle points rather than local minima. For such problems advanced gradient descent optimization variants were invented (eg: Momentum, Adam, RMSprop).

Happy optimizations!

How much AI and Machine Learning are related to ancient Greek Philosophy? More than you imagine!

In this article you will learn about the never ending debate between Platonic and Aristotelian ideas of the reality of the world.

In my opinion, I agree with Plato saying that the world we experience is just a shadow of the real one. One possible interpretation can come from modern physics with theories such a) multidimensional world (e.g. string theory, theory of relativity) b) quantum physics and c) non-Euclidean geometrical spaces. Things are not as they appear in our brains. We see only a projection of the real world and we are totally living in a matrix limited by our physiology.

However, I agree also with Aristotle saying that the forms of entities reside only in the physical world. So, the “ideal” forms are learned by our brains and do not pre-exist.

The article touches the issue of Universals and Particulars in Philosophy and tries to explain them also in terms of Machine Learning. Machine Learning models learn to separate the universal (signal) from the particulars (noise) from observed data of the world.

Plato (left) and Aristotle (right)

Before AI we were “programming” computers.

In this context a programmer creates a program to solve a specific problem using data structures and algorithms. After that, we can run the program with some input data to produce some output. Let’s call this Traditional Programming.

Nowadays, with AI we are “showing” computers.

In this context a programmer shows to a learning algorithm input and output data for a specific problem to be solved. The program is automatically created by the learning algorithm. After that, we can run the program with some new input data to produce its output. Let’s call this Machine Learning.

Nowadays, computer science departments in universities teach most the Traditional Programming mindset. For boosting an AI-powered society it would be wise to teach equally Machine Learning!

Hi people!

I have created -just for fun- a Node.js web application that provides you a random data science image! Currently, the app is deployed in Heroku but I have limited monthly resources. So, if there is anyone who has premium account and would like to host it for free I would be grateful!

Heroku Application:

http://random-data-science-image.herokuapp.com

Source Code Repository:

http://github.com/efstathios-chatzikyriakidis/random-data-science-image

Images Database Repository:

http://github.com/efstathios-chatzikyriakidis/data-science-images

Happy Hacking!

PAPER

E. Chatzikyriakidis, C. Papaioannidis and I. Pitas, “Adversarial Face De-Identification,” 2019 IEEE International Conference on Image Processing (ICIP), Taipei, Taiwan, 2019, pp. 684-688

PRESENTER

Anastasios Tefas

PDF

https://github.com/efstathios-chatzikyriakidis/adversarial-face-de-identification/blob/master/texts/icip-2019-presentation.pdf

Hello people!

Here is a prototype agent-based auctions simulation using Jade Agents.

This prototype can be useful for comparing auction protocols under specific circumstances. It is written in Java and uses the Java Agent Development Framework. Currently, it supports only the following auction protocols (it is just a prototype):

Each auction simulation can run between one Auctioneer and any number of Bidders. Furthermore, each Bidder and the Auctioneer use as input a file with the auction product items. For each auction product item the Bidders have their price estimation and the Auctioneer has its minimum bid price.

View full article »

Presentation topic: “Content-based Image Retrieval”

Presenter: Efstathios Chatzikyriakidis

PDF presentation: https://github.com/efstathios-chatzikyriakidis/content-based-image-retrieval/blob/master/presentation.pdf

Source code: https://github.com/efstathios-chatzikyriakidis/content-based-image-retrieval/tree/master/source-code

Presentation topic: “Multi-Factor Authentication”

Presenter: Efstathios Chatzikyriakidis

PDF presentation: https://github.com/efstathios-chatzikyriakidis/security-access-control-multi-factor-authentication/blob/master/presentation/SAC-MFA.pdf

Source code: https://github.com/efstathios-chatzikyriakidis/security-access-control-multi-factor-authentication/tree/master/development/security_access_control_multi_factor_authentication

Presentation topic: “Adversarial Face De-identification”

Presenter: Efstathios Chatzikyriakidis

PDF presentation: https://github.com/efstathios-chatzikyriakidis/adversarial-face-de-identification/blob/master/texts/msc-thesis-presentation.pdf

Experiments (exported files): https://github.com/efstathios-chatzikyriakidis/adversarial-face-de-identification/tree/master/results

Presentation topic: “Adversarial Examples and Generative Adversarial Networks”

Presenter: Efstathios Chatzikyriakidis

Contributor: Christos Papaioannidis

PDF presentation: https://github.com/efstathios-chatzikyriakidis/adversarial-face-de-identification/blob/master/research/MultiDrone%20-%20Adversarial%20Examples%20-%20GANs.pdf

This project refers to an Arduino library implementing a generic, dynamic stack (array version).

The data structure is implemented as a class in C++.

For more information, you can get the project itself ‘StackArray‘.

Hello people! I hope you are well!

In this article I would like to present you a simple C++ 3D vector library. This is just a prototype and I am sure you can find other better and more complete alternatives. So, we are just dealing here with a “Yet Another 3D Vector Library”.

I created this library because I wanted to reuse some 3D vector operations in various OpenGL computer graphics exercise programs (from my M.Sc. studies). Of course, I could use an already existing library. However, I wanted also to understand how some basic 3D vector operations work.

View full article »

Hello my Arduino fellows! How are you? The summer is hot! 🙂 In this post I would like to share with you two generic C++ template functions for reading from / writing to the Arduino EEPROM internal memory. I have used in the past these functions successfully in a project and I think that might be also useful to you.

It is a fact that just by looking the contents of a single byte in any memory we are not able to say what the data actually mean. The data or the bit pattern that appears has any meaning we want. It is always the context that gives meaning to data. It could be a memory address, an unsigned integer, a two’s complement signed integer, a machine opcode, an opcode operand, an IEEE-754 floating point number, an ASCII character, noise 🙂

View full article »

Hello my friends! How are you? It’s been a long time since the last time I posted an article! In this one I would like to present you some digital image processing algorithms implemented with C++ and OpenCV.

Although, OpenCV supports most of these algorithms out-of-the-box what I am trying to show you actually is how you could implement these manually with C++. So, OpenCV is used here just only for opening and manipulating an image as a Mat object (OpenCV’s basic image container).

View full article »

Recently, I have participated in the 1st Hackathon of the Technological Educational Institute of Central Macedonia in Greece. Our team has developed a web application for the refugee crisis that exists in our country (Greece) on our days.

View full article »

MongoDB is a great NoSQL database management system. But using a single standalone MongoDB server is not the way you want to use it in the production level. In case you want to scale out and increase the throughput of your application you can use sharding to distribute your data in multiple clusters, called shards. Furthermore, MongoDB can support continuous availability and fault tolerance by using replication servers that form a replica set. A replica set not only provides us a mechanism for fault tolerance and availability but a way for safely and continuously backing up our data. The latency of our database queries can be improved by using primary and secondary indexes.

View full article »

In a recent Arduino embedded system I needed to manage an Arduino GSM Shield for some specific use cases. However, I couldn’t use the well-known GSM library due to memory capacity limitations since this library “eats” the Arduino board memory 🙂 I could use an Arduino board with more memory capacity but this was not the case for me. I wrote the library SimpleGSM, which is a simple GSM library for managing the Arduino GSM shield (maybe you can use the library with other GSM cards) and execute some basic operations. I wrote the library to have exactly the operations I wanted. The library uses internally a software serial for the communication.

View full article »

Here I am, rock you like a hurricane!

The Spring framework from the Java “universe” currently supports efficiently the Neo4j graph database. However, the Spring.NET framework from the C# “universe” does not support Neo4j and generally a decent code infrastructure library for Neo4j is missing from the .NET open source world at the moment.

A starting code infrastructure could be a Generic Repository for supporting CRUD operations, a Relationship Manager for managing relationships between nodes and a Unit Of Work for supporting transactions. In a recent project, I have coded a prototype code infrastructure on my own since I couldn’t find a simple, well-written and unit-testable example. This is the reason why I would like to give it to you people so that you can benefit from it.

View full article »

This project refers to a Security Alarm System implemented with Arduino and various electronics.

Below, are some of the system characteristics:

View full article »

In this article I will present to you a dynamic string data structure helper implementation. In C, a string is just an array of characters terminated with the null character (NUL in ASCII). Also, some times we handle a string by using a pointer to a buffer containing sequential characters terminated also with the null character. The C standard liibrary provides various functions for string manipulation but it seems that whenever we want to extend a string by using pointers we have to perform all the time memory reallocation which leads to a bad evolution of replicated code. In a recent project, I needed to create a string and append to it any number of new strings in order to extend it without using strcat, strcpy, strlen and realloc functions all the time. So, I created a simple dynamic string data structure which solved my specific problem and I would like to share it with you people.

View full article »

In this article I will present to you a useful function for getting the host name and service of a socket.

View full article »

In this article I will present to you some useful functions for handling the PID file of a background daemon. Most of the background daemons maintain a PID file usually in a well-known path such as the “/var/run”. For example, the GNOME Display Manager which runs as a background daemon (gdm3) maintains the following file “/var/run/gdm3.pid”. A PID file contains the PID number of the daemon process currently running. This information is useful either for validation or for sending various signals to the daemon process. Also, if a background daemon must have a single running instance this can be accomplished by checking if the PID number of the PID file really exists in the system.

View full article »

In this article I will present to you two useful functions that can be used whenever you want to enable or disable the non-blocking I/O mode of a file descriptor. By using the enable_io_blocking_for_file_descriptor and disable_io_blocking_for_file_descriptor functions you can enable and disable the I/O blocking of a file descriptor.

View full article »

In this article I will present to you a safe wrapper for freeing memory allocated with *alloc family functions. The standard function “void free (void * pointer)” from stdlib library does not check the given pointer to see whether it is NULL and does not NULL terminate the pointer before it returns either. So, setting a pointer to NULL after freeing is considered a good practice, and can reduce the chances of unpredictable behavior if the memory is later accessed; segmentation faults when the memory is no longer accessible and potential security risks.

View full article »

In this article I will present to you some macro definitions for handling interruptible system calls.

View full article »

In this article I will present to you a mechanism written in C for handling efficiently software signals in POSIX operating systems. The first thing you have to do is to create the configuration of the signals you want to support. After you decide the appropriate configuration you have to setup the signals support and register the configuration. Later on, when the various software signals occur a generic signal dispatcher will handle the signals according to the specified configuration.

View full article »

In this article I will present to you a POSIX function I wrote that can be used to create a server socket to support both IPv4 and IPv6 addresses (IP-Agnostic). Recently, I needed to support this feature in a server application. The implementation uses POSIX system calls and data structures that can be used as generics to support both IPv4 and IPv6.

View full article »

In a previous article I had shown to you how a typical process in GNU/Linux operating systems can be converted to a background daemon process. The source code from the previous article was taken from an old project I wrote years ago. Nowadays, I have rewritten the daemonizing function in a new project and I think it could be nice to share it. I have simplified the function and now it has a clearer and simpler API.

View full article »

Zepto Web Server is a tiny open source HTTP web server well-written in C that can handle simple HTTP requests and serve information in HTML format by using dynamic modules that can be loaded at runtime. Also, the HTTP web server runs as a daemon process and is designed according to the MPM (Multi-Processing Module) architecture that allows multiple requests to be processed almost simultaneously. The main server daemon process creates and maintains various server workers which handle incoming requests.

View full article »

In this article I’ll show you how you can create the abstract syntax tree (AST) of an input stream while parsing it. A parser usually reads various tokens from its input by using a lexer as a helper coroutine and tries to match various grammar rules that specify the syntax of a language (the source language).

View full article »

In this article I’ll present to you some common conflicts that usually occur in Bison grammars and ways of resolving these. At first, conflicts in Bison context are situations where a sequence of input can be parsed in multiple ways according to the specified BNF grammar rules.

View full article »

In this article I’ll show you how syntactically similar tokens can be handled in a unified way in order to simplify both lexical and syntactic analysis. The trick is to use one token for several similar operators in order to keep down the size of the grammar in the parser and to simplify the regular expression rules in the lexer.

View full article »

Sometimes while I exploring the source code of various free software Flex lexers and Bison parsers I see name declarations for single character tokens.

View full article »

Many programming languages and computer files have a directive, often called “include” (as well as “copy” and “import”), that causes the contents of a second file to be inserted into the original file. These included files are called copybooks or header files. They are often used to define the physical layout of program data, pieces of procedural code and/or forward declarations while promoting encapsulation and the reuse of code.

View full article »

Below, there are some useful regular expressions for matching C-like primitive data values.

View full article »

In a previous article I have presented a way for ignoring multiline comments with an old fashion way.

In this article I’ll demonstrate a more elegant Flex-like way for ignoring multiline comments.

View full article »

Below, is a simple example for counting words, lines and characters by using a Flex lexer.

View full article »

AngularJS is really a great open-source framework for creating single page web applications (SPA) based on MVW (Model / View / Whatever) architecture. In this article, I’ll present to you how the Repository design pattern can be used in order to encapsulate into a separate layer all the underlying communication with a back-end remote system for performing CRUD operations. The example next is very simple since the user can load either a list of customers or a list of orders by clicking the appropriate link from a menu.

View full article »

The project ‘Hasher’ is an open source .NET C# library which implements salted hashing.

You can use Hasher in your next account system to secure your sensitive data (e.g. user passwords).

View full article »

2013 In Review.

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 17,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 6 sold-out performances for that many people to see it.

Click here to see the complete report.

This project aims to the development of an open-source experimental prototype for solving and generating Sudoku puzzles by using only the strength of Genetic Algorithms. This is not a general purpose GA framework but a specific GA implementation for solving and generating Sudoku puzzles. The mechanics of the GA are based on the theoretical scientific paper “Solving and Rating Sudoku Puzzles with Genetic Algorithms” of Timo Mantere and Janne Koljonen. From the first moment, I liked the paper. So, I implemented it in Python. Also, I have add some variations to the algorithm in order to be more efficient. This project can be used in order to solve or generate new NxN Sudoku puzzles with N sub-boxes (e.g. 4×4, 9×9, etc).

View full article »

Below, is an Arduino function for reading smoothly an average value from a jumpy or erratic analog input sensor. The function reads repeatedly from an analog input, calculating a running average and returns the value back to the caller.

View full article »

In this article I’ll show you how you can use the HTML5 Geolocation API in order to get user’s location.

View full article »

The project ‘RestApiWrapUtility’ (RESTful API Wrapper Utility) is an open source .NET C# utility which implements a RESTful API wrapper. The utility is created in order to be an intermediate layer between clients that want to communicate with a remote server in order to use its RESTful services.

View full article »

In this article I’ll show you how you can make an XML to HTML5 transformation by using the XSLT language.

View full article »

In this article I’ll show you how you can handle / parse the following RFID Tags from Sparkfun Electronics :

1) RFID Glass Capsule (125kHz) – Product ID: SEN-09416

2) RFID Button – 16mm (125kHz) – Product ID: SEN-09417

3) RFID Tag (125kHz) – Product ID: COM-08310

View full article »

In this article I’ll show you a simple PHP function that implements email validation.

The function performs two checks :

It checks both if the email has correct syntax and if the domain of the email exists.

View full article »

The Qt framework supports internationalization (I18N) and you can easily use it to your applications with a little effort. So, in this article I’ll show you how you can make it happen in a simple Qt application. The first thing you should do is making the GUI of the application translation-aware. That means setting all the texts you want of your widgets to be translatable. From the Qt Designer you can make translation-aware all your widgets. Here is an image that shows you how you can make the text of a QPushButton instance to be translation-aware :

View full article »

In your lexer when lexical analysis is performed you may want to ignore any multiline C-like comments.

View full article »

Whenever you want to post your email address to the public and don’t want to use a Contact Form which usually hides the address, try to display the address of the email as an image in order to avoid spam.

One way to achieve this is to manually create your email address as an image and embed it to your contact page. Most of the times we want this operation to be automatically. So, I have created a simple example to show you how you can make this possible.

View full article »

Whenever we create a new source code file for a free software with Emacs we need first to add the short brief of the blessed GNU GPL v3. You can add a LISP function to your “~/.emacs” configuration file and call it whenever you want to add it.

If the file is missing you can create it.

After inserting the function and restarting Emacs you can call the function:

M-x insert-short-gpl (press Alt-x, type insert-short-gpl, press return).

View full article »

Many text editors create backup files with names ending with “~”.

Most of the times these files are annoying and unnecessary…

So, you can use the following piped commands to remove them :

find / | grep "^.*~$"
       | sed -e 's/\(^.*$\)/"\1"/g'
       | xargs rm -f > /dev/null 2>&1

Please take account that this version handles correctly also filepaths containing space characters.

You Came.

You Came

At a time that just passed, here upon this rock, where the tears of the silent and initiated hearts have been etched forever; time stopped, the clock went quiet, and as the beat of my heart continued to loudly sound like the talanton, like the voice of the subtle breeze, it was you that came. And here, my darling, you appeared again lovingly, through the sacred paths of my wounded mind, in the scene of my secret and invisible life.

It’s already morning, it is already night, and you’re still beside me. At each step, you want me to see freely, not through the right or the left eye, nor through the logic which is recycled like a square box, but with the heart, that the most beautiful thing, the most gracious, arises through the quietness of senses and humble sacrifice which only knows how to be emptied.

So, here I encounter with admiration your right hand which, although wounded, keeps the swallow of hope intact. Behold, I also see a rose in your left hand which you offer me because of being in love.

You are my port in the stormy sea, my joy in every difficulty. Your wounded hands are my cozy nest. But how it that from your right emerges what the air embraces and how from your left what the soil longs?

I engrave novel pages in my hectic life and direct myself with simplicity in the yesterday of my purer soul. I walk and I go, stepping barefoot; and like you did once, I am painting mysteries on the sand. With my lips unworthy, but filled with hope, like the child of his very own noble mother’s, I touch the milk of your love. I become a partaker of your face and, because of the intense flash of your light, I blossom without water and soil.

Join to Terranova today!

Find people around you with common interests, common needs, common things you want to do.

Find professionals that offer what you are looking for!

Terranova is up for iPhone!

So you can download and use it for free!

2012 In Review.

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 17,000 views in 2012. If each view were a film, this blog would power 4 Film Festivals.

Click here to see the complete report.

Within the framework of the course “Operating Systems I – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we were asked to choose one of 25 available projects aiming to implement and then present to the entire class. My choice was project 17, whose goal was the implementation of the external ‘find’ command of the operating system MS-DOS.

View full article »

This project refers to an Arduino sketch that implements a light indicator with the help of an external sensor (photoresistor) for the recognition of light, and a bar graph of many LEDs used as a rating indicator. Furthermore, if the indicator reaches the last rating which indicates that there is “perfect” light (the maximum light that the sensor can identify) then it plays a melody with a piezo speaker located in the system.

View full article »

This project refers to an Arduino sketch that implements a simple alarm clock using a light sensor, a piezo speaker, two buttons for functions such as ON, OFF and an LED as the function indicator. When the alarm is in OFF state, then it carries no real operation (just turns off the function indicator), and when in ON state, then it turns on the function indicator and examines whether there is sufficient ambient light (via the light sensor) to produces a musical tune with piezo speaker. This process is repeated continuously if there is sufficient light until the button OFF is pressed.

View full article »

This project refers to an Arduino sketch that implements an Arduino Web Controller. Basically, the Arduino works as a network device that can be configured either locally or remotely by a special WEB interface. This technology is not new as it exists in other network devices. For example, routers or network printers are configured through a WEB interface.

View full article »

This project refers to an Arduino sketch which has the capability to send measurements collected by a light sensor to an account at Twitter to be seen by many through the World Wide Web.

View full article »

This project refers to an Arduino sketch which with the help of a relay (electromechanical switch) and a light sensor can drive an external device (e.g. a household lamp, a car alarm, a home air conditioner). More specifically, the Arduino collects samples from a light sensor at a specific rate and calculates the mean of samples for best accuracy. Then, if the average exceeds a threshold limit, it will activate the device via the relay. Also, the opposite happens where, if the average sensor value drops below the limit mentioned, the device is turned off.

View full article »

This project refers to an Arduino sketch which is used to produce animations with more than one LED. You can place several LEDs in a row or in any order you wish and enjoy the flow of traffic. Furthermore, if you wish to change the animation you can choose the next in line by pressing a special button. One such application might remind you of the Christmas lights.

View full article »

Within the framework of the course “Software Engineering I – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we developed as a semester assignment a parking management application.

Both the graphical user interface (GUI) and the application are implemented with Qt in C++. Specifically, with this application, the end user can manage a variety of customers, customer cards, vehicles, transactions, parking, vehicle fees, etc.

View full article »

The project ‘tct ‘(The Crime Tracer) is an online adventure police game. Of course it has not yet implemented because it is under development. The game is a free software initiative of two volunteers who love and respect science and the freedom of users. Anyone can join the project as a volunteer, provided they are good-willed and have some free time. Also, the game is being developed using the Python programming language and the Pygame framework.

The project ‘shell-library’ (Shell Function Library) is a developers’ effort to develop a free shell library with POSIX general purpose functions. The functions that the library offers can be used within shell scripts developed to automate the work of your operating system.

View full article »

Within the framework of the course “Computer Architecture – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia), I felt the wish to develop a program that produces sound from the BGC-8088’s speaker.

View full article »

Within the framework of the course “Computer Architecture – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia), I felt the wish to develop a program that flashes in a sequential manner the light-emitting diodes of the development platform BGC-8088.

View full article »

Within the framework of the course “Computer Architecture – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we were asked to choose one of the available projects in order to implement it. My choice was project 1, whose aim was to implement a program that can solve single variable equations of first degree of the form ax + b = 0.

View full article »

The project ‘nxnes’ (NxN Equalisations Solver) is the implementation of project 5 from the list of selected projects in the course “Operating Systems II – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia). The objective of this project was the implementation of the Gauss Elimination Method to solve a NxN system of linear equations.

View full article »

Within the framework of the course “Operating Systems II – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we were asked to choose one of the 20 available projects to achieve. My choice was project 10, whose goal was to implement a birthday and celebrations alert system.

View full article »

The project ‘OSHACKERS’ (Operating System Hackers) and the website ‘oshackers.org’ refer to a safe, free, friendly and useful to the end-user online web system for visualising information related to the various users of the various free and open operating systems around the world.

View full article »

It is true that Software Programming is a branch of Computer Science about which I’m pretty enthusiastic. But I’m very excited at the times when I learn something new and innovative on programming. Such a period of learning of new issues on programming was when I began to wonder about the way the Internet works. My questions were related to the client – server architecture model (on whose base the Internet and its services has been designed), how web applications is in practice implemented and how I could implement an Internet service on my own.

View full article »

The project ‘vs-cms’ (Very Simple Content Management System) is a personal project and a web content management system.

View full article »

The project ‘www-el‘ (formerly ‘elwebtrans’) serves to translate all the important articles, texts (web pages) of the GNU Project in the Greek language. All members of the project ‘www-el‘ are volunteers who contribute their work to spread the GNU Project and the philosophy of the Free Software Foundation in the Greek public. If you have some free time and want to contribute to the defense of liberty and the further dissemination of Free Software, help our project.

Within the framework of the course “Operating Systems II – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we developed as a semester assignment an application whose aim was to simulate the evolution of a colony of single-celled organisms, namely the creation of the famous game of life.

View full article »

The project ‘tct‘ (The Crime Tracer) fanned my wish to create a resource manager for the needs of the game. Generally, a resource manager increases efficiency in most cases because it uses internal caching and mapping. The resource manager of the project ‘tct‘ is written in Python and manages graphics, sounds and Pygame fonts.

View full article »

Fosscomm 2012 (Serres).

A beautiful and dynamic experience that I hope will be repeated again.
Congratulations to the organizers and participants of this conference.
Their contributions to Free Software was invaluable.

This project refers to the development of the procedural programming language YAFL (Yet Another Free Language) as well as its interpreter. The programming language YAFL is a tool for teaching the basic principles of procedural programming to secondary school students and beginners in general.

View full article »

The GNU Project by Richard Stallman
The original version was published in the book “Open Sources”

The first software-sharing community

When I started working at the MIT Artificial Intelligence Lab in 1971, I became part of a software-sharing community that had existed for many years. Sharing of software was not limited to our particular community; it is as old as computers, just as sharing of recipes is as old as cooking. But we did it more than most.

View full article »

On 21/12/11 at TheHackerspace we made 3 presentations on game developing by using open hardware and free software. Specifically, the presentations were: a) competitive multiplayer game for reinforcing visual skills and reflexes implemented with Arduino, b) engine for moving various sprites in two-dimensional games implemented with Python and Pygame, c) various games with Arduino and Gameduino.

View full article »

The project “Steganography System” refers to an open-source steganography system which can be used to hide text in digital media formats (image, audio, video). Generally, steganography is the art of hiding a message in a way that its existence is only known to its recipient.

View full article »

2011 In Review.

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 27,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 10 sold-out performances for that many people to see it.

Click here to see the complete report.

The project ‘tct‘ (The Crime Tracer) made me wish to create an engine for moving various sprites in two-dimensional games. This engine is a prototype and is continuously optimized. It has also been developed with the help of Pygame and Python. Additionally, you can find a rough example that uses the engine of the project ‘tct‘ (The Crime Tracer).

View full article »

The project “PGASystem” (Parallel Genetic Algorithms System) is an under development system based on the client / server architecture and can be used to implement and study of parallel genetic algorithms.

View full article »

The first openSUSE collaboration weekend camp was held in Katerini on 15-17 July 2011. There was also a workshop according to the programme held by TheHackerspace on “Security & Arduino” which included the presentation of two embedded security systems both at hardware and software levels.

View full article »

TheHackerspace (Thessaloniki’s Hackerspace) is here!

We announce that at 7.00 pm on Thursday 30/6 we organize a kick-off event for the presentation of TheHackerspace at the Art Cafe “Kokini Klosti Demeni” which is the permanent meeting place at 32 Nicosia Street, Kalamaria, Thessaloniki. Come to get to know us, to see you and share ideas!

The TheHackerspace is an open laboratory for research, collaboration, creativity and learning. But above all, it is a vibrant community of people with ideas and concepts stemming from the philosophy of Free Software / Open Hardware. The idea for the project was started a few months ago by people who love Hacking, both software and hardware, and soon was put into practice with passion and desire to contribute to the community.

Our moto is “Love to hack embedded & operating systems!“.

Happy Hacking,

Stergios Kalamopoulos
Efstathios Chatzikyriakidis
Stavros Kalapothas

Dear Readers and Friends of Free Software,

On 5/30/11 (Sunday) there was the fifth seminar, thus completing the circle of free seminars on the ARDUINO open source electronic platform. Specifically, at the fifth seminar I presented my thesis whose subject is the following:

Network implementation of wireless radio communication between two embedded nodes (identification node ​​and control node) for the remote control of devices via digital identification and recognition of physical objects using the Arduino platform.

I feel I must express a very big thank you to the Association of Greek Users and Friends of FS / OSS, especially the living people behind it who are perfectly respectable and cooperative personalities, open minded and with a progressive dynamic potential, giving me the opportunity through this cycle of free workshops to distribute freely my knowledge and my experience on the world of Embedded Systems.

Sincerely,

Efstathios Chatzikyriakidis

The Association of Greek Users and Friends of Free Software / Open Source Software invites you to the new presentation in the new round of free courses and presentations organized with a view to deepening the knowledge and alternative use and exploitation of FS / OSS:

Fifth Seminar on the Open Source Platform ARDUINO about:

Network implementation of wireless radio communication between two embedded nodes (identification and control node) for the remote control of devices via digital identification and recognition of physical objects using the Arduino platform.

Important Notice: It is necessary to attend this seminar for obtaining certifications by those who attended the Arduino seminars organized by the GreekLUG in the year 2010 – 2011.

The presentation will be made by the Informatics Scientist and Communications Engineer as well as Arduino hacker, Efstathios Chatzikyriakidis on what is the first thesis based on the Arduino in Greece.

The event will take place at 17:00 on Sunday, May 29, 2011 in the Computer Laboratory of the Department of Economics, University of Macedonia.

The Free Software / Open Source Software Association (FS / OSSA) recently organized a conference entitled “Open Source: Opportunity Development” in various cities. Also, last Sunday (22/05/11), I had the opportunity to attend the one-day workshop held at the University of Macedonia in Thessaloniki.

View full article »

Thoughts on Automatic Software Repairing and Genetic Programming

In the field of Software Engineering enough emphasis is given on the development of methodologies and mechanisms for the design of optimal software systems. Moreover, the quality of a software system can be assessed by carrying out appropriate metrics. Key features under study during the evaluation of a system are reliability, stability, security, portability and usability. The quality of a software system depends mainly on the time spent, expenses made, debugging and testing techniques used etc.

View full article »

The following function is applied onto a graph and it specifically implements the method of breadth-first search. To visit all nodes connected to node k of a graph, we put the k in a FIFO queue and then go into a loop, during which we get the next node from the queue and, if we have not already visited it, we visit it and push into the queue all nodes belonging to the adjacency list of this node, continuing this process until we empty the queue.

View full article »

The following program creates the syntax tree of a mathematical expression in prefix notation. For simplicity, we assume that the terms of the expression are individual characters (digits). Each time the recursive function parse() is called, a new node is created, whose value is the next character of the expression. If the value is a term (digit), we return the new node. However, if it is an operator, we set the left and right pointers to point the tree made (recursively) for the two operands.

View full article »

The iterative (non-recursive) function preorderTreeTraverse() can perform preorder traversing of a binary tree with the help of a stack that can hold pointers to nodes of the tree.

Also, the iterative (non-recursive) function layerTreeTraverse() can perform level-order traversing of a binary tree with the help of a queue that can hold pointers to nodes of the tree.

View full article »

To calculate a prefix expression, we either convert a number from ASCII to decimal (in the loop ‘while’ at the end of the program) or implement the operation indicated by the first character of the expressions to the two terms, with a recursive calculation. This function is recursive, but it uses a global array containing the expression and an index number for the current character of the expression. The index number goes beyond each sub-expression calculated.

View full article »

The elegant recursive solution to a problem is most of the times invaluable. Although the iterative solution of that problem is likely to have a better space and time complexity, it is often preferred to use the recursive version for clarity and simplicity. It is remarkable how easily a problem can be solved by use of a recursive manner. In this article we will try to record a collection of useful recursive functions:

View full article »

The following program converts an expression from infix to postfix notation. The conversion is carried out with the help of a stack. For example, to turn the expression (A + B) into the postfix form A B +, we ignore the left parenthesis, convert the A to postfix form, we store the + operator on the stack, we convert B to postfix form and then, when find the right parenthesis, we pop the + operator from the top of the stack. In particular, the following implementation works only for the addition and multiplication of integers.

View full article »

The following program reads any postfix expression that includes integer multiplication and addition, evaluates the expression and displays the final result on the screen. The program stores the intermediate results in a stack of integers.

The terms (operands) are pushed onto the stack. The operators are applied to the two entries at the top of the stack (the two entries are popped from the stack); the result is pushed back into the stack. Because the order in which the two pop() functions are performed in the expression of this code is not specified in C++, the code for some non-commutative operators, such as the ones for subtraction and division, would be somewhat more complicated.

View full article »

The following program demonstrates a significant processing operation on arrays of strings. More precisely, we present the re-sorting of a set of strings in order to classify them. So, we read the strings and place them in a temporary storage area (buffer) large enough to be able to store all, keeping in an array a pointer to each string. Then we re-sort the pointers (only pointers and not strings to increase the performance) to place the pointer to the “smallest” string at the first position of the array, the pointer to the next “largest” string at the second position of the array, and so on.

View full article »

The following program reads a set of edges that define a graph and creates a representation of this graph with an adjacency list. The adjacency list of a graph is an array of lists, one for each vertex, where the j-th list contains a linked list of the nodes which are connected with the j-th vertex.

View full article »

The following program reads a set of edges that define an undirected graph and creates a representation of this graph with an adjacency matrix, giving a[i][j] and a[j][i] the value of 1 if there is an edge from i to j or from j to i in the graph, or the value of 0 if it does not exist. Also, we assume that the number of vertices V is a constant known at compilation time. Otherwise, there should be dynamic memory allocation for the array that represents the adjacency matrix.

View full article »

The following program finds all the occurrences of a word in a text string. We set the text string as an array of characters of fixed size (although we could, instead, use the operator ‘new’) and read it from the standard input using the function cin.get(). The memory allocation for the word entered in the command line and passed on as argument is done by the system before this program is called and we find the pointer to the string in argv[1]. For every starting position i in the array a, tries to associate the substring starting from this position with the p, checking character by character for equality. Each time we reach the end of p successfully, we display the starting position (i) of the word in the text on the screen.

View full article »

Below, we quote a function for managing a transaction in a hypothetical transaction management system. It is very likely multiple instances of the function to be executed in parallel on a system of symmetric multiprocessing (SMP), on multi-processor platforms or even a multithreaded single processor systems.

View full article »

Taxonomy

The Ant Colony System algorithm is an example of an Ant Colony Optimization method from the field of Swarm Intelligence, Metaheuristics and Computational Intelligence. Ant Colony System is an extension to the Ant System algorithm and is related to other Ant Colony Optimization methods such as Elite Ant System, and Rank-based Ant System.

View full article »

Taxonomy

The Cultural Algorithm is an extension to the field of Evolutionary Computation and may be considered a Meta-Evolutionary Algorithm. It more broadly belongs to the field of Computational Intelligence and Metaheuristics. It is related to other high-order extensions of Evolutionary Computation such as the Memetic Algorithm.

View full article »

Taxonomy

Harmony Search belongs to the fields of Computational Intelligence and Metaheuristics.

View full article »

Taxonomy

Simulated Annealing is a global optimization algorithm that belongs to the field of Stochastic Optimization and Metaheuristics. Simulated Annealing is an adaptation of the Metropolis-Hastings Monte Carlo algorithm and is used in function optimization. Like the Genetic Algorithm, it provides a basis for a large variety of extensions and specialization’s of the general method not limited to Parallel Simulated Annealing, Fast Simulated Annealing, and Adaptive Simulated Annealing.

View full article »

Taxonomy

Memetic Algorithms have elements of Metaheuristics and Computational Intelligence. Although they have principles of Evolutionary Algorithms, they may not strictly be considered an Evolutionary Technique. Memetic Algorithms have functional similarities to Baldwinian Evolutionary Algorithms, Lamarckian Evolutionary Algorithms, Hybrid Evolutionary Algorithms, and Cultural Algorithms. Using ideas of memes and Memetic Algorithms in optimization may be referred to as Memetic Computing.

View full article »

Probably sometime you will need to write a program in assembly language. For this reason, in this article we will develop a simple and typical executable “Hello World” program in assembly language to familiarize yourself with the process.

View full article »

Black Box testing and general testing is a key step in the iterative development methodologies (e.g. UP, XP, Agile) as it performs both the validation and verification of units in a system.

View full article »

Within the framework of the course “Computer Networks III – Theory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we were asked to write a presentation related to the content of the course. The topic of my presentation was Genetic Routing.

I quote below a personal portable implementation (in C++) of a classic Differential Evolution algorithm used to maximize the function f(x) = sin(x) in the domain 0 <= x <= 2pi. You can compile the program with the g++ compiler.

View full article »

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function f(x, y) = sin(x) * sin(y) in the domain 0 <= x, y <= 2pi. You can compile the program with the g++ compiler.

View full article »

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function f(x) = sin(x) in the domain 0 <= x <= 2pi. You can compile the program with the g++ compiler.

View full article »

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function f(x) = sin(x) in the domain 0 <= x <= 2pi. You can compile the program with the g++ compiler.

View full article »

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function f(x) = sin(x) in the domain 0 <= x <= 2pi. You can compile the program with the g++ compiler.

View full article »

Taxonomy

The Artificial Immune Recognition System belongs to the field of Artificial Immune Systems, and more broadly to the field of Computational Intelligence. It was extended early to the canonical version called the Artificial Immune Recognition System 2 (AIRS2) and provides the basis for extensions such as the Parallel Artificial Immune Recognition System [Watkins2004]. It is related to other Artificial Immune System algorithms such as the Dendritic Cell Algorithm, the Clonal Selection Algorithm, and the Negative Selection Algorithm.

View full article »

Taxonomy

The Self-Organizing Map algorithm belongs to the field of Artificial Neural Networks and Neural Computation. More broadly it belongs to the field of Computational Intelligence. The Self-Organizing Map is an unsupervised neural network that uses a competitive (winner-take-all) learning strategy. It is related to other unsupervised neural networks such as the Adaptive Resonance Theory (ART) method. It is related to other competitive learning neural networks such as the the Neural Gas Algorithm, and the Learning Vector Quantization algorithm, which is a similar algorithm for classification without connections between the neurons. Additionally, SOM is a baseline technique that has inspired many variations and extensions, not limited to the Adaptive-Subspace Self-Organizing Map (ASSOM).

View full article »

Taxonomy

The Genetic Algorithm is an Adaptive Strategy and a Global Optimization technique. It is an Evolutionary Algorithm and belongs to the broader study of Evolutionary Computation. The Genetic Algorithm is a sibling of other Evolutionary Algorithms such as Genetic Programming, Evolution Strategies, Evolutionary Programming, and Learning Classifier Systems. The Genetic Algorithm is a parent of a large number of variant techniques and sub-fields too numerous to list.

View full article »

Taxonomy

Iterated Local Search is a Metaheuristic and a Global Optimization technique. It is an extension of Multi Start Search and may be considered a parent of many two-phase search approaches such as the Greedy Randomized Adaptive Search Procedure and Variable Neighborhood Search.

View full article »

Taxonomy

Random search belongs to the fields of Stochastic Optimization and Global Optimization. Random search is a direct search method as it does not require derivatives to search a continuous domain. This base approach is related to techniques that provide small improvements such as Directed Random Search, and Adaptive Random Search.

View full article »

Taxonomy

The Adaptive Random Search algorithm belongs to the general set of approaches known as Stochastic Optimization and Global Optimization. It is a direct search method in that it does not require derivatives to navigate the search space. Adaptive Random Search is an extension of the Random Search and Localized Random Search algorithms.

View full article »

Taxonomy

The Stochastic Hill Climbing algorithm is a Stochastic Optimization algorithm and is a Local Optimization algorithm (contrasted to Global Optimization). It is a direct search technique, as it does not require derivatives of the search space. Stochastic Hill Climbing is an extension of deterministic hill climbing algorithms such as Simple Hill Climbing (first-best neighbor), Steepest-Ascent Hill Climbing (best neighbor), and a parent of approaches such as Parallel Hill Climbing and Random-Restart Hill Climbing.

View full article »

Within the framework of the course “Software Engineering II – Laboratory” (Department of Informatics and Communications, T.E.I. of Central Macedonia) we developed as a semester assignment an application for the management of hotel businesses.

Both the graphical user interface (GUI) and the application were implemented with Qt while the database in SQLite. More specifically, the end user can perform through this application functions such as: processing of customers / rooms, booking rooms, search rooms / customers, inventory of hotel services offered to customers, central management for the correct operation of the hotel, central management of the cost of services provided, as well as adding new users and system administrators to the system.

View full article »

This project refers to a safe, friendly and useful to the end-user Web Geographic Information Management System which is used for displaying and managing GIS on the Internet. The Geographic Information is located on an exclusive database (MySQL) and the user can browse them by categories. The system also has both front-end for the viewing of GIS as well as back-end for managing the overall system.

This project is free software and you can improve it if you want to.

View full article »

On Sunday 19th December 2010, there was the fourth seminar on the ARDUINO open source electronic platform in the same place where the previous one was also held.

In the presentation of the fourth seminar, we studied cases of use of wireless communication with ARDUINO. Initially, we discussed the basics and the theoretical aspects of wireless communication, the advantages and disadvantages in radio and infrared communication.

View full article »

The Association of Greek Users and Friends of Free Software / Open Source Software invites you to the new presentation in the new round of free courses and presentations organized with a view to deepening the knowledge and alternative use and exploitation of FS / OSS:

Fourth Seminar on the Open Source Platform ARDUINO

The presentation will be made by the Informatics Scientist and Communications Engineer as well as Arduino hacker, Efstathios Chatzikyriakidis.

The event will take place at 17:00 on Sunday, December 19, 2010 in the Computer Laboratory of the Department of Economics, University of Macedonia.

On Sunday 05/12/10, there was the third seminar on open source e-platform ARDUINO held at the same place as the previous one.

The presentation was attended by several people whose interest for the ARDUINO was remarkable. The questions during the presentation and especially at break time were numerous as well as interesting.

View full article »

The Association of Greek Users and Friends of Free Software / Open Source Software invites you to the new presentation in the new round of free courses and presentations organized with a view to deepening the knowledge and alternative use and exploitation of FS / OSS:

Third Seminar on the Open Source Platform ARDUINO

The presentation will be made by the Informatics Scientist and Communications Engineer as well as Arduino hacker, Efstathios Chatzikyriakidis.

The event will take place at 16:00 on Sunday, December 5, 2010 in the Computer Laboratory of the Department of Economics, University of Macedonia.

On Saturday 20th, November 2010 there was the second seminar on open source e-platform ARDUINO held at the same place as the previous one.

The presentation was attended by several people whose interest for the ARDUINO was remarkable. The questions during the presentation and especially at break time were numerous as well as interesting.

It was also wonderful that the event was attended by scientists from different disciplines, such as engineers, artists, programmers, etc.

View full article »

The Association of Greek Users and Friends of Free Software / Open Source Software invites you to the new presentation in the new round of free courses and presentations organized with a view to deepening the knowledge and alternative use and exploitation of FS / OSS:

Second Seminar on the Open Source Platform ARDUINO

The presentation will be made by the Informatics Scientist and Communications Engineer as well as Arduino hacker, Efstathios Chatzikyriakidis.

The event will take place at 17:00 on Saturday, November 20, 2010 in the Computer Laboratory of the Department of Economics, University of Macedonia.

Dear Readers and Friends of Free Software,

First of all, as a return gift of gratitude, I owe a big thanks to both the FS / OSS Association, who gave me the opportunity to freely share my knowledge and my experiences about the world of ARDUINO with you through the cycle of seminars started on Sunday 24/10/10 as well as to all of you who attended the first seminar filling the hall of the laboratory with your presence and your interest.

View full article »

The Association of Greek Users and Friends of Free Software / Open Source Software invites you to the new presentation in the new round of free courses and presentations organized with a view to deepening the knowledge and alternative use and exploitation of FS / OSS:

Open Source Electronics Platform ARDUINO

The presentation will be made by the Informatics Scientist and Communications Engineer as well as Arduino hacker, Efstathios Chatzikyriakidis.

The event will take place at 13:00 on Sunday, October 24, 2010 in the Computer Laboratory of the Department of Economics, University of Macedonia.

It was a very interesting experience for me to participate in the mission of the Department of Informatics and Communications of the T.E.I. of Central Macedonia in Thessaloniki, where the Department took part in the Infosystem 2010 exhibition.

View full article »

Below there are some basic processing functions of strings in C. The implementations are approached with the pointers of C, thus creating faster and more compact code.

View full article »