Javascript 3 – Use console to debug or die

Using alert() to debug really sucks. I always have to pray for my inserted alert to come up and it often doesn’t and I have no idea why or I kill my browser by never ending loop with alerts I can’t stop or I would get this error Object object that basically says “Just Give It Up!”.

Well, alert time is over. I was told to use a console.log(). Suddenly the JS world seems a bit nicer.

I prefer the Google Chrome console. You can activate it by hitting F12.

Example 1 – feeling much better already ๐Ÿ˜‰

[code lang=”js”]

var test = ‘Defined’;

var test2;



Continue reading “Javascript 3 – Use console to debug or die”

Javascript 2 – a function returning a function

I had some troubles with understanding this piece of code. [code lang=”js”]

var doSth = (function () {
var a = 1;
return function() {

/* The variable "doSth" points to an anonymous function
that is called afterwards via the brackets ().

It returns a piece of code that is then available in the variable doSth.
The returned code alerts the variable "a" incremented by 1.
FIX: it alerts variable "a" and then it is incremented by 1.

So now the variable "doSth" contains an executable code */


Continue reading “Javascript 2 – a function returning a function”

Javascript 1 – variable scope

I don’t understand Javascript and probably never will. I am not a programmer and probably never will be… unless i get hit by something and my brain will click into some programming guru mode. But still, I really would like to get at least some of the code I see from my colleagues or even write something that makes sense by myself. Something I wouldn’t call “neverusable”. Sooo hold your thumbs… if I lose this fight my brain is only good for coding HTML & CSS. ๐Ÿ™‚

I realized I have to start and learn the basics properly. ๐Ÿ™‚
I started with a variable scope.

Example 1

[code lang=”js”]
var a = 1;
function doSth() {

// This is quite simple.
// alerts 1
/* variable "a" has a global scope so wherever
you are in the code you can access it unless there is another
variable named "a" within the function you are calling the variable from */

Continue reading “Javascript 1 – variable scope”

Buchty recipe โ€“ Czech sugar buns

My recipe for “ฤeskรฉ buchty” is adapted to US measurements. You can see step by step how to make sugar buns from activating the yeast, making the dough, kneeding the dough, making the cheese filling with raising and finally making a nice batch of buchty.

Never had buchty? It is a simple but very tasty pastry made from basic ingredients flour, milk, eggs, butter and sugar. In Czech it is called “ฤeskรฉ buchty”, in English you can find a term “Czech sugar buns”.

Czech buchty - Czech sugar buns
Czech buchty – Czech sugar buns
Continue reading “Buchty recipe โ€“ Czech sugar buns”

Baked sweet rice dish with peaches or plums

In Czech we call it “Rรฝลพovรฝ nรกkyp”. Just so you know in case you talk with somebody from Czech. ๐Ÿ™‚

As I got this recipe from my mom in European measurements I tried to adjust it to US measurements. In brackets I left the Czech way. Here is what we need.

  • 3/4 liter of milk
  • 1 cup of rice (20 Dg)
  • 3 eggs
  • 7 tablespoons of UNSALTED butter (10 Dg) Leave the butter outside on the counter when you start cooking the rice so it will be little bit softer and easier to process it.
  • tiny bit of butter you have left for coating the baking dish
  • 1/3 cup + 1 tablespoon of powdered sugar (10 Dg) If you do it in deka gramms, just divide the sugar into 2 halves (1 half to mix with yolks and 1 half mix with whites)
  • breadcrumbs for coating the baking dish
  • can of peaches or apricots or plums
  • lemon zest
  • pinch of salt



Continue reading “Baked sweet rice dish with peaches or plums”

Black bean burgers

I got this recipe from my colleague Laura Higgins about 4-5 months ago. Every time I met Laura she would ask me “Did you do the burgers or not?” And I always said “No”. Tomorrow eventually I can tell “Yes, I did it”. ๐Ÿ™‚ I am going to use this as a proof of my today’s cooking. I know that Laura would be happy to see that I even put together a little manual for many other bean lovers. ๐Ÿ™‚

Those burgers are unbelievably easy to do. As a healthy choice you can have them only with some salad instead of in a bun.

All needed ingredients: 2 Cans of Black beans, Mayo, Breadcrumbs, Ground Cumin, Dried Oregano, Cayenne Pepper, Fresh cilantro, Oil, Hamburger Buns
All needed ingredients: 2 Cans of Black beans, Mayo, Breadcrumbs, Ground Cumin, Dried Oregano, Cayenne Pepper, Fresh cilantro, Oil, Hamburger Buns

Continue reading “Black bean burgers”