programming

Variable Scopes in C++

Variables in every programming language are used to store values that can change the program.

JSP partials – how to include files

A partial is a page with a piece of HTML or other code that can be included into other pages. Best examples are header and footer files that are being included into all pages of the website. You may also have complicated logic that you would like to separate or some repetitive code.

Read and write to spreadsheet in Java

I was writing an algorithm that would run and produce some results. These results should have been stored some place and retrieved during next program run. New values would then be added to the resulting list. The program needed to remember all the results from all run.

Parse Apache log files with Python

We run our website on Apache servers and they generate a huge amount of log files every day. Looking through these files is a full time job, so we decided to parse them automatically to retrieve the data about possible 404 and 403 errors.

Send email with Python

Sending emails with Python scripts is easy if you have a server running. There are several libraries you need to use.

Replace string in XML file with Python

In this example we will show how to read XML and CSV files with Python, and perform search and replace operations. The result will be written into a new file with the same filename, but with “_new” appended to the filename.

Integrating LibreOffice into C++

At our math website we publish printable PDF worksheets for school children. We’ve just started publishing crosswords, while relatively easy to create, they require much work to make them into tasks.

Too many functions in Java code

Many java developers follow the principles of clean code. But can it be too much? I have recently reviewed code that had almost a dozen of wrappers around its private members. When is code readable enough?