We are happy to announce an event, especially organized for those of you who want to improve their public speaking skills (in English). A demonstrational meeting held by the Toastmasters Club Sofia will take place in our “Light” training hall on November, 27th 2012 (Tuesday) @18:30.
How Toastmasters Public Speaking Workshops Work?
A Toastmasters meeting is a learn-by-doing workshop with a no-pressure atmosphere. There is no instructor. Instead, members evaluate one another’s presentations. This feedback process is a key part of the program’s success. Meeting participants give prepared speeches, evaluation speeches as well as impromptu talks on assigned topics, and develop skills related to timekeeping, grammar and parliamentary procedure.
A typical meeting of Sofia Toastmasters consists of three prepared speeches and five impromptu speeches as well as a lot of evaluation and feedback for the speakers. It takes up to two hours. As it is an international organization the official language is English.
If you are eager to give a presentation, test your public speaking skills and receive a friendly feedback, or you prefer to listen to the speakers, share your opinion and gain some experience, you are welcome to join the session. As usual, admission is free andonly a registration is required.
About Toastmasters International
Toastmasters International is a club in which people train and practice their presentation and leadership skills. There are Toastmasters clubs in 116 countries and the global membership currently is over 200 000 people. Watch a video of a regular meeting on “Public Speaking” and learn more about the initiative: http://bit.ly/Q4SrFp.
Please bear in mind that the seats available for next Tuesday are limited. We will, however, try to organize such meeting on regular basis (twice a month).
I was invited to give a talk at DevReach 2012 – the largest developer conference in South-Eastern Europe. DevReach 2012 will host 60+ sessions in 6 parallel tracks (Web, Mobile, Cloud, Architecture, Agile and Testing) in 2 days. It will be held in Sofia (4-5 October) and is organized by Telerik and Martin Kulov.
My Talk at DevReach 2012: Public .NET Clouds
In the last year I got solid experience about cloud development, public cloud platforms, cloud database, storage and other cloud services. I organized a practical cloud development course at Telerik Academy last year. I teach C# and JavaScript and I focus on .NET and HTML5 platforms, so I am notably interested in .NET clouds. I have researched many clouds that claim to provide .NET cloud platform but most of them do not really provide .NET PaaS solution, but just IaaS cloud hosting, which is different. My lecture and demonstration will be about the public .NET PaaS platforms: “Public Cloud Platforms for .NET Developers”.
Public clouds platforms are rapidly growing and many businesses move partially or fully their IT infrastructure to the cloud. The big players like Microsoft, Google, Oracle and Amazon operate their own public cloud platforms while the smaller players provide cloud services and PaaS platforms and on top of the larger. What about the .NET developers and the cloud?
In this talk the speaker will introduce the public .NET clouds and will compare the leading .NET PaaS clouds: Windows Azure, AppHarbor, Uhuru and AWS Elastic Beanstalk for .NET. The .NET public clouds will be compared in terms of architecture, programming model, pricing, development stack, available services, deployment model and tools for administration and monitoring. A live demo will show how to deploy and run a typical .NET application (based on ASP.NET MVC and MS SQL Server) in AppHarbor and Uhuru.
I will not show a demo about Amazon AWS and Beanstalk for .NET as well as about Azure. Azure and AWS will be well covered at DevReach 2012 and it will be more practical to demonstrate the other .NET cloud platforms: AppHarbor and Uhuru. In fact most public clouds like Heroku, Engineyard, OpenShift and CloudBees, Oracle and VMware do not support .NET as a development and deployment stack. You have two options: use IaaS and handle the entire architecture and deployment yourself or use some of the four main players at the .NET public cloud market (as of September 2012):
Windows Azure and SQL Azure – the Microsoft’s .NET cloud which requires to adopt and partially rewrite your application to run in the cloud. Many developers avoid it due to high prices and the differences in the platform.
Amazon AWS Beanstalk for .NET – the Amazon AWS cloud adapted for .NET developers. It is in fact a mix of IaaS service well suited for .NET development and deployments and Amazon’s PaaS services. Many developers prefer it, but I personally don’t like Amazon because the charge for resources which are not allocated and not in use.
AppHarbor – my favorite .NET public cloud. It has free version for testing and deployment of small applications and is really made easy for developers, pure .NET platform and APIs, scalable, with many plugin services.
Uhuru – the other public .NET cloud which has free version for testing and small .NET applications. It is based on a solid general purpose cloud platform, the CloudFoundry, adapted to support Windows and .NET.
DevReach 2012 – New PowerPoint Template
At each large conference where I am speaker, I need to fix and improve the PowerPoint template that the organizers send to the speakers for the conference slides. I don’t know why but seems like designers are hired to make good looking slides and their design does not cover all use cases for typical developer conference slides (e.g. consistent colors, layout showing source code, layout for titles slides, layout for normal slides, layout for the questions slide).
For all DevReach 2012 speakers I provide my fixed version of the PowerPoint (PPTX) template (with my presentation included in it):
PMI Bulgaria (българската секция на Международния институт по управление на проекти PMI) организира “16th PMI Bulgaria Chapter Members Meeting” на тема “Creativity and Mind Maps in Project Management” на 9 юли (понеделник) от 18:30 часа в Софтуерната академия на Телерик (зала Ентерпрайс).
Програма на обучението
Семинарите на PMI Bulgaria по принцип са за членовете на PMI. Ако се интересувате от управление на проекти, можете да станете член на PMI Bulgaria на място на събитието.
18:30 – 19:00 – Регистрация (за нови членове на PMI си носете снимка)
19:00 – 19:45 – Креативност и мисловни карти в управлението на проекти (част I)
19:45 – 20:00 – Почивка
20:00 – 20:45 – Креативност и мисловни карти в управлението на проекти (част II)
20:45 – 21:30 – Дискусия, представяне на нови членове, коктейл
Лектор на семинара ще е Антон Ценов от Mindmapping.bg – лицензиран инструктор от ThinkBuzan – организацията на Тони Бюзан (изобретателят на мисловните карти).
Регистрация за PMI семинара
За участие в обучението по управление на проекти с използване на мисловни карти, трябва да се регистрирате най-късно до 8 юли от формата за регистрация.
I often create simple Web sites and in most cases I use WordPress as a CMS (content management system). If the customer does not need something very special and unique, I prefer to use proven free WordPress themes or paid themes from Theme Forest (if I have non-zero budget). This works well for small Web sites, saves time and money, makes the customers happy and the support later is straightforward. WordPress does its job well. It is great for building small Web sites and blogs and it is SEO-friendly (after very few customizations) and has a lot of plugins and extensions, including reliable spam protection (thanks to Akismet).
Free WordPress Themes?
Finding a high-quality WordPress theme with a modern Web design, HTML5, customizable, without major bugs and well working is not so easy like many may initially assume. The are thousands free WordPress themes at WordPess.org themes directory but to be honest 99% of them are bull shit.
Collecting High-Quality Free WordPress Themes
I have a nice habit: collecting good free WordPress themes. In my daily work if occasionally I some Web site with a good WordPress theme catches my eyes, I check its and its theme. If the site is WordPress based and it theme is free, I collect the theme name and its download URL. I do this because due to marketing, spam and SEO, it is hard to find really free and really high-quality WordPress themes on the Web. Most sites advertise a theme as free and high-quality, but the reality is different.
How Do I Check If Certain WordPress Theme is Free?
Just click [Ctrl+U] (view page source) and then [Ctrl+F] (find text) an search for “wp-content/themes” or just “themes/”, then see the name of the theme, e.g. “snowblind”. Once you know the theme name, find the theme site in Google (e.g. search for “snowblind theme wordpress”). At the theme Web site check whether it is free and optionally try to download, install and test it.
High-Quality Free WordPress Themes – My Favorites
After few months I came to the following 10 free high-quality WordPress themes which are my favorites:
Happy wordpressing … and if you need some day a really good free WordPress theme, check the list above. Also feels free to share your favorites in the comments below.
I use the Questions2Answer Q&A platform (Q2A) for Telerik Software Academy forums. It is great discussion board implemented in the “stackoverflow” style: questions with answers and comments, tags and categories, voting and gamification with a score system and a leaderboard.
One feature missing in Q2A is displaying the open unanswered questions. There is a similar feature called “Unanswered Questions” but it is useless because it shows the closed questions without answer. This is strange. Once a question is closed, this means its answer has been found by its author or the question is found to be duplicate or spam or irrelevant to the forum and should never be answered. Most Q&A users agree that all closed questions should be considered answered and not shown as “waiting an answer”.
Fixing the “Unanswered” Page in Q2A
The easiest way to fix the “Unanswered” questions page to exclude the closed questions is to change the line
$bysql='acount=0';
to
$bysql='acount=0 AND closedbyid IS NULL';
in the function “qa_db_unanswered_qs_selectspec” located in the file “qa-include/qa-db-selects.php”.
This ugly approach works but if you upgrade the Q2A software with a newer version, the fix will be lost. A better approach is to use a plug-in. It is not hard to write a plugin for Q2A platform because it is well written, structured and even documented and uses standard PHP and MySQL programming techniques and best practices.
Open Questions Plugin for Question2Answer
I created an open-source project in GitHub to host the “Open Questions” plugin for Q2A: https://github.com/nakov/q2a-plugin-open-questions. The plugin consists of 3 PHP files and it is relatively easy to understand how it works. The installation is trivial.
If you want to install it, just download the archive q2a-plugin-open-questions.zip and extract it into the “qa-plugin” directory of your Q2A installation and enable it through the Admin panel:
Few day ago I needed a JavaScript AES implementation (the Rijndael advanced encryption algorithm) which I can test instantly in my Web browser (two fields “text” and “password” and “encrypt” button). I searched for “online AES tool” but found nothing that is ready-to-use so I needed to write one. For those who need instant online Browser-based JavaScript AES encryptor / decryptor that runs without any plugins client-side, enjoy! Thanks to Mark Percival for his AES JavaScript library.
How the JavaScript AES Encryptor / Decryptor Works?
This online form encrypts with AES (Rijndael) instantly given text with the AES-128 algorithm and produces a BASE64-encoded output: cipher = BASE64_Encode(AES_Encrypt(text, password)). The algorithm first extracts a 128-bit secret key and AES IV (initial vector) from the password and then after padding the input encrypts it (by 128-bit blocks). Finally the encrypted binary result is encoded in BASE64. A random salt is injected along with the password to strengthen the encryption code. The key-extraction algorithm and the format of the output AES-encrypted message is compatible with OpenSSL.
The decryption algorithm first decodes the BASE64 string, extracts from it the random salt used during the encryption, extracts the AES key and IV from the password and the salt and decrypts back the encrypted text.
The encryption / decryption implementation of the AES (Advanced Encryption Standard, a.k.a. Rijndael) algorithm in JavaScript is written by Mark Percival (see his open-source project gibberish-aes at GitHub).
AES Online Encryption Tool – Source Code
Below is the source code of the online AES encryption tool:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://raw.github.com/mdp/gibberish-aes/master/src/gibberish-aes.js"></script>
<title>Free Online AES Tool - Encrypt / Decrypt Text with AES Online</title>
</head>
<body>
<h1>Online AES Encryptor / Decryptor - Free AES Tool</h1>
<h2>(JavaScript client-side AES cipher implementation)</h2>
<table>
<tr>
<td>Text to encrypt:</td>
<td><textarea id="text" />Enter the text to be encrypted here...</textarea></td>
</tr>
<tr>
<td>Password:</td>
<td><input id="password" value="some password" /></td>
</tr>
<tr>
<td>Encrypted text:</td>
<td><textarea id="encryptedText" readonly="readonly"></textarea></td>
</tr>
<tr>
<td>Decrypted text:</td>
<td><textarea id="decryptedText" readonly="readonly"></textarea></td>
</tr>
<tr>
<td colspan="2" align="center">
<button id="buttonStart">AES Encrypt / Decrypt</button>
</td>
</tr>
</table>
<script>
$('#buttonStart').click(function() {
var text = $('#text').val();
var pass = $('#password').val();
GibberishAES.size(128);
var encrypted = GibberishAES.enc(text, pass);
$('#encryptedText').val(encrypted);
var decrypted = GibberishAES.dec(encrypted, pass);
$('#decryptedText').val(decrypted);
});
</script>
</body>
</html>
Recently I was again asked how do we perform “cin >> a >> b” in C# or how we can enter a sequence of numbers from the console in C#. In C++ we have very powerful class called “cin” (more correctly std::cin located in the standard library “iosteam”) that overloads the >> operator and allows entering anything from the standard input (stdin): numbers, characters, strings and other data types.
I searched for “cin in C#” and found nothing similar to “std::cin” for C#, so I needed to write such a class.
The Nakov.IO.Cin Class – “cin” Functionality for C# / .NET
Initially I had an idea to implement my C# “cin” class exactly like in C++. Unfortunately this was impossible because the C# language has certain limitations:
You cannot override the >> operator in C# for any type except int
You cannot override the >> operator in C# for output / by-ref types (e.g. out int, ref int)
You cannot add extension methods to the Console class because it is static (so additions like Console.Cin, Console.NextInt(), Console.In << x << b and Console.Cin.NextInt() cannot be added to it)
Finally I decided to implement my C# console simplifies reader it in a way similar to the Java syntax used in the java.util.Scanner class. See the code below:
namespace Nakov.IO
{
using System;
using System.Text;
using System.Globalization;
/// <summary>
/// Console input helper for C# and .NET. Allows simplified reading of numbers and string
/// tokens from the console in a way similar to "cin" in C++ and java.util.Scanner in Java.
/// </summary>
///
/// <copyright>
/// (c) Svetlin Nakov, 2011 - http://www.nakov.com
/// </copyright>
///
/// <example>
/// // In C++ we will use "cin >> x >> y;"
/// // Using Nakov.IO.Cin we can do the same as follows:
/// int x = Cin.NextInt();
/// double y = Cin.NextDouble();
/// </example>
///
public static class Cin
{
/// <summary>
/// Reads a string token from the console
/// skipping any leading and trailing whitespace.
/// </summary>
public static string NextToken()
{
StringBuilder tokenChars = new StringBuilder();
bool tokenFinished = false;
bool skipWhiteSpaceMode = true;
while (!tokenFinished)
{
int nextChar = Console.Read();
if (nextChar == -1)
{
// End of stream reached
tokenFinished = true;
}
else
{
char ch = (char)nextChar;
if (char.IsWhiteSpace(ch))
{
// Whitespace reached (' ', '\r', '\n', '\t') -->
// skip it if it is a leading whitespace
// or stop reading anymore if it is trailing
if (!skipWhiteSpaceMode)
{
tokenFinished = true;
if (ch == '\r' && (Environment.NewLine == "\r\n"))
{
// Reached '\r' in Windows --> skip the next '\n'
Console.Read();
}
}
}
else
{
// Character reached --> append it to the output
skipWhiteSpaceMode = false;
tokenChars.Append(ch);
}
}
}
string token = tokenChars.ToString();
return token;
}
/// <summary>
/// Reads an integer number from the console
/// skipping any leading and trailing whitespace.
/// </summary>
public static int NextInt()
{
string token = Cin.NextToken();
return int.Parse(token);
}
/// <summary>
/// Reads a floating-point number from the console
/// skipping any leading and trailing whitespace.
/// </summary>
/// <param name="acceptAnyDecimalSeparator">
/// Specifies whether to accept any decimal separator
/// ("." and ",") or the system's default separator only.
/// </param>
public static double NextDouble(bool acceptAnyDecimalSeparator = true)
{
string token = Cin.NextToken();
if (acceptAnyDecimalSeparator)
{
token = token.Replace(',', '.');
double result = double.Parse(token, CultureInfo.InvariantCulture);
return result;
}
else
{
double result = double.Parse(token);
return result;
}
}
/// <summary>
/// Reads a decimal number from the console
/// skipping any leading and trailing whitespace.
/// </summary>
/// <param name="acceptAnyDecimalSeparator">
/// Specifies whether to accept any decimal separator
/// ("." and ",") or the system's default separator only.
/// </param>
public static decimal NextDecimal(bool acceptAnyDecimalSeparator = true)
{
string token = Cin.NextToken();
if (acceptAnyDecimalSeparator)
{
token = token.Replace(',', '.');
decimal result = decimal.Parse(token, CultureInfo.InvariantCulture);
return result;
}
else
{
decimal result = decimal.Parse(token);
return result;
}
}
}
}
How Cin.NextDouble() Works?
My class Nakov.IO.Cin allows simplified entering string tokens, integer numbers, floating-point numbers and decimal numbers in C# from the standard input (the console). When reading a sequence of numbers, we can separate them with a single space, multiple spaces, new line separators or any other sequence of whitespace characters: spaces, tabs, new lines (\n, \r\n), etc.
In addition Nakov.IO.Cin solves the culture-specific problem with the decimal point separator which may be “,” in some countries (like Bulgaria) and “.” in other countries (like USA and Canada). The Cin.NextDouble() and Cin.NextDecimal() methods accept a Boolean parameter which specifies whether the numbers should be parsed using the default decimal separator (specified in the regional settings in Windows) or by accepting both separators: “.” and “,”. By default both decimal separators are accepted when entering numbers by Nakov.IO.Cin.NextDouble() and Nakov.IO.Cin.NextDecimal().
Using the Nakov.IO.Cin Class – Example
In the below example I show how to use the class “Nakov.IO.Cin” to enter integer numbers, floating-point numbers, decimal numbers and string tokens:
using System;
using Nakov.IO; // see http://www.nakov.com/tags/cin
public class CinExample
{
static void Main()
{
Console.Write("Enter your name: ");
string name = Console.ReadLine();
Console.Write("Enter two integers x and y separated by whitespace: ");
// cin >> x >> y;
int x = Cin.NextInt();
double y = Cin.NextDouble();
Console.Write("Enter your age: ");
int age = int.Parse(Console.ReadLine());
Console.WriteLine("Name: {0}, Age: {1}", name, age);
Console.WriteLine("x={0}, y={1}", x, y);
Console.Write("Enter a positive integer number N: ");
int n = Cin.NextInt();
Console.Write("Enter N decimal numbers separated by a space: ");
decimal[] numbers = new decimal[n];
for (int i = 0; i < n; i++)
{
numbers[i] = Cin.NextDecimal();
}
Console.Write("The numbers in ascending order: ");
Array.Sort(numbers);
for (int i = 0; i < n; i++)
{
Console.Write(numbers[i]);
Console.Write(' ');
}
Console.WriteLine();
Console.WriteLine("Enter two strings seperated by a space: ");
string firstStr = Cin.NextToken();
string secondStr = Cin.NextToken();
Console.WriteLine("First str={0}", firstStr);
Console.WriteLine("Second str={0}", secondStr);
}
}
Translating from C++ “cin” to C# Using the C# “cin” Class
Once you have included the class Nakov.IO.Cin to your C# / VB.NET project, you could translate the following C++ program into C#:
Sample C++ code entering a number N and a sequence of N integer numbers, separated by a space (or any other sequence of whitespace characters):
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int* numbers = new int[n];
for (int i = 0; i < n; i++)
{
cin >> numbers[i];
}
for (int i = 0; i < n; i++)
{
cout << numbers[i] << ' ';
}
}
The same code written in C# using the C# “cin” class (Nakov.IO.Cin) is as follows:
using System;
using Nakov.IO; // see http://www.nakov.com/tags/cin
public class EnteringNumbers
{
static void Main()
{
int n;
n = Cin.NextInt();
int[] numbers = new int[n];
for (int i = 0; i < n; i++)
{
numbers[i] = Cin.NextInt();
}
for (int i = 0; i < n; i++)
{
Console.Write(numbers[i] + " ");
}
}
}
With both the programs (the C++ and the C# one) you are free to enter all the requested numbers on a single line (e.g. “3 1 –2 3”) or on separate lines (e.g. “\r\n 3 \r\n 1 \t –2 \r\n\r\n 3”)) and they will be parsed correctly, as expected.