Developer vs Googler

So you google a lot while writing code or developing a piece of application and that makes you wonder whether you really are a good programmer or just a good googler? Lets find out.

This thought has been bugging me for the last few months since it seems like I cant really do anything without the help from the mighty ‘G’. Whether its a simple JavaScript String.ReplaceAll() method or a C# String.ReplaceFirst() method. Lets see what most of us (considering a developer of average skills) will come up with, without googling:


//C# ReplaceFirst(): Replaces the first occurrence of a given pattern with another
public string ReplaceFirst(string baseText, string toSearch, string toReplace) {
    int pos = baseText.IndexOf(toSearch);
    if (pos < 0) {
        return baseText;
    }
    return baseText.Substring(0, pos) + toReplace + baseText.Substring(pos + toSearch.Length);
}

//JavaScript ReplaceAll(): Replaces all instances of a given pattern from a string
function ReplaceAll(toSearch, toReplace, baseText) {
    while ( baseText.indexOf(toSearch) > -1) {
        baseText = baseText.replace(toSearch, toReplace);
    }
    return baseText;
}

Now, on first thought, my incapable mind did not event think about using RegularExpressions! If I were to google first, I could’ve done much better:


//C# ReplaceFirst(): Replaces the first occurrence of a given pattern with another
public string ReplaceFirst(string baseText, string toSearch, string toReplace) {
    var regex = new Regex(Regex.Escape(toSearch));
    return regex.Replace(baseText, toReplace, 1);
}

//JavaScript ReplaceAll(): Replaces all instances of a given pattern from a string
function ReplaceAll(toSearch, toReplace, baseText) {
    return baseText.replace(new RegExp(toSearch, 'g'), toReplace);
}

Now that you’re thinking I must be a noob to not think about using RegularExpressions on the first place, how about we try to do this without RegularExpressions but in a super cool way?


//JavaScript ReplaceAll(): Replaces all instances of a given pattern from a string
function ReplaceAll(toSearch, toReplace, baseText) {
    return baseText.split(toSearch).join(toReplace)
}

If I had googled first, I could see all these different implementations which I would be able to use in similar scenarios in future, not just this one. These solutions might not be bulletproof but will do the job for my particular need. Also, imagine the facial expression of the developer who gets to work on this after me seeing all these elegant solutions to otherwise very simple problems.

Googling is simply not about copying code out of peoples work but also to explore the possibilities. Technology has enabled us to share and teach what we know to others who wants to know. There is nothing wrong with a bit of researching before jumping into writing codes. You’ll be surprised to see what you could learn simply by studying other peoples code and suggestions. And not all of our problems are related to programming, we also need to trouble shoot server problems, network connectivity issues, code deployments etc. All these will keep throwing different challenges to you and its not heroic to try to solve all these without any help. If you have a senior colleague or a friend or a mentor who helps you whenever you’re stuck, google does the same for you. Its true that if you’re blindly copying the code and pasting without even understanding or studying the code, than this can not be any worse for you!

How could we make the most out of googling and improve our skills at the same time?

  • Study the solutions provided by others. Compare their solutions to what you had in mind.
  • Try to learn different ways to solve a problem. Do not stop at the first solution you get.
  • Use the knowledge you’ve gained to solve other problems of the same kind.
  • Avoid copying wherever possible. Get the idea, understand the algorithm but write your own code. Nothing beats the knowledge gained by doing it yourself even though you’ve borrowed the idea off someone else.
  • If you think you can do better, contribute to the community. Take your solution to them.
  • Even if you think you know the solution to a problem, studying always helps. With the always changing technologies, chances are you’ll find a better solution each time you look!

So folks, don’t worry about how you code as long as you get to learn something in the process. Its okay to not know something and its a lot better than knowing the wrong thing.

Iwagumi Bowl

My iBowl – 5g Iwagumi Bowl

The journey started when I got addicted to Iwagumis but my wife would not allow another tank in my home. Due to warm and dry weather conditions in Bangladesh, I had bad experiences with Hemianthus Cuba (HC) before, so I wanted to set this up inside an air-conditioned room! Luckily, a 5 gallons bowl did not count as a *tank* and I somehow magically convinced (read blackmailed) my wife to place it inside our bedroom. She even went as far as buying the stand for me!

There were some major challenges.  First, I wanted to start dry, in which I had no idea before. Second, my previous attempts of growing HC did not go well. Third, it is inside our bedroom so I need to make it aesthetically good, otherwise I might get thrown out of the house along with my little project. Fourth, I did not have any solid plan on the filtration I’d be able to install inside a container this small. I knew I simply can not buy something off the LFS but make something on my own. Fifth, quality commercial substrates like ADA AquaSoil are not available in my country and I needed to come up with a good soil recipe. Sixth, I needed good looking stone pieces suitable for Iwagumi layout.

I bought a 5 gallons bowl from a local store. Also picked up a wall mounting light fixture which can hold a 15W CFL (6500K Phillips) from Nababpur. I had to use a small piece of wood in order to mount it to wall. A local fish-keeping friend of mine helped me with the stones. And my wife bought me a rose wood textured stand from Panthopath.

I mixed garden soil and river mud 3:1, then mixed some earthworm compost 5:1 to the total volume. Later I mixed siphoned water off my tank (with fish waste and poops) with the soil and let it dry a little bit until it became like a dough. I picked some sylhet sand from my other tank and put a 1cm layer in the bowl. Then I added a 2cm layer of the soil. I added the stones on top of the soil layer and played a bit with the formation. At this point I planted a few stems of HC borrowed from a fellow hobbyist inside the bowl, covered the top using a plastic wrap and put it under light. The lighting hours were irregular, from as low as 6 hours to 16 hours a day.

Iwagumi Bowl

Day 01

A few days later, a shipment of plants came to a LFS and I got a pot of HC. I separated and planted each stem individually. I kept misting the plants once a day with fertilizer mixed water.

Iwagumi Bowl

Day 08

After 7 days, I got slight hint of BGA (Blue Green Algae/Cyanobacteria).

Iwagumi Bowl

Day 15

I immediately stopped the fertilizer, switched to plain water, soaked the extra water off the soil using a sponge and cut down on the misting sessions but it did not help a bit, the BGA started to spread rapidly. I tried to cover the BGA by sprinkling a layer of dry sand over the soil in hope to choke it but did not help either.

Iwagumi Bowl

Day 20

From my previous experience I knew it is a bad sign and I did not have any option other than putting medicines. But, previously I dosed the medicine in the water column, so how in the world do I dose Erythromycin in a dry setup? i seriously started to consider flooding the tank and dosing medicine but later I took the simplest option of adding it to the spray bottle. I sprayed two times a day with Erythromycin mixed water. The BGA turned black after three days but I continued to dose for 7 days.

Now I did not have any BGA left but the plants were in bad shape. They simply would not grow and it took them at least three weeks to start growing new leaves. After two months, I had a good enough carpet of HC. Oh, I added some Dwarf Hairgrass too!

Iwagumi Bowl

After two months

I used an airline tube to slowly fill the tank.

Iwagumi Bowl

Filling the tank

I added DIY CO2 (Yeast + Sugar) almost immediately and also added a small 200LH power-head so that the CO2 reaches evenly across the container. I could see good pearling for the next few days. I still need to come up with an idea for filtration and need to decide on what too keep. Currently I have a Nerite snail ruling the bowl!

Iwagumi Bowl

DIY CO2 with DIY Diffuser

Next Week Update:
Its been 7 days since I flooded the bowl and its going steady. I have not noticed any kind of melting, blackening of leaves yet. I have DIY CO2 on 24/7 and a small water-pump for circulation. I have added a DIY filter using a half-cut beverage bottle with holes drilled at the bottom, some synthetic cotton and a small powerhead. The total height of the filter is 4 inch and the diameter is 2 inch. I have used fishing thread to hang the filter from top. The water enters from below, through the synthetic cotton and then pumps back to the bowl by the powerhead. I had two failed prototypes before this design worked. Its been 3 days and the filter is running stable.
I had to change the filtration system. Please read below the update from 24/09/2013.

Iwagumi Bowl

DIY Filtration

Oh I have also added a young pair of my own bred platy in the tank. I will cycle the tank for 3 more weeks and if everything looks okay, I will be adding some shrimps to it.

Iwagumi Bowl7 days after flooding

Update [19/09/2013]:
Facing brown algae (diatom) problem. Reduced the lighting hours from 10 hours to 6 hours. The Nerite snail is too big to clean the brown algae off HC leaves, but it did a nice job cleaning the glass walls. Deployed an Otocinclus today, lets see if this can keep the problem under limit. If I see it cleaning the brown algae, I will put a few more. My only concern is that, since the cycle is not complete, the Otocinclus might have a hard time surviving there. If I see it struggling, I will take it off.

The brown algae appears in new tanks because of the imbalance. As the tank matures, these get over-powered by the plants or other types of green algae. Its been slightly more than a week since I have introduced the filtration system. I am hoping as soon as the bacteria colony establish themselves and the cycle is complete, the tank should recover.

Update [22/09/2013]:
Added 3 pairs of Yellow shrimps (Neocaridina heterpoda var. Yellow) along with the Otos. Removed the pair of Platy.

Update [24/09/2013]:
Spotted severe problem with the filtration. The enclosure was transparent but the bacteria like to grow in the dark. This also explains the instability of the tank since the previous filter actually did nothing but mechanical filtration. Switched to mini spray bar power filter. Installed it with the help of an acrylic piece placed vertically. Cleaned the bowl, did a 50% water change and replaced the filter media with one from my existing tank. Hope this sorts the filtration problem once and for all.
Aaaand spotted a berried shrimp! Yay!!

Iwagumi Bowl

Berried Yellow Shrimp

Update [26/09/2013]:
Facing cloudy water problem. It might be due to the nitrogen cycle being incomplete, another possibility is its just road-side dust. We live beside the main road and our room gets tons of dust everyday.

Update [30/09/2013]:
I experimented by keeping a lid on top of the bowl during the off-light hours and guess what! No more cloudy waters! Also the carpet seems to have covered the bottom of the tank. The submerged growth is at-least twice faster compared to emerged growth. The bowl is stable and running without CO2 for more than two weeks. There has been no sign of algae, brown algae seems of have disappeared as well. I am maintaining a lighting period of 6-6.5 hours daily and 50% water change every 3/4 days.

Iwagumi Bowl

High light promotes compact growth of HC

Iwagumi Bowl

The growth of DHG is out of control

Update [06/10/2013]:
The bowl is stable with no major disaster or algae problem. The rocks are showing slight green tint as a result of maturity. I can rub them off but decided to keep them for now. I have added 6 Galaxy Rasboras. As soon as they settle in the tank I’ll post a picture of them. The filtration system is now working flawlessly with no detectable toxins. The only problem I have is a thin oil layer keeps forming on top of the bowl. I hope this is from the lubricant of the new filter, but if not I’ll have to add in a skimmer of some type. Lighting hours remains at ~7 hours a day with 30% weekly water change.

Update [27/10/2013]:
The tank is stable. Plants growth is steady. No algae issue other than a few strands of Hair Algae which is removed manually while cleaning. The Shrimps and the Rasboras are doing fine.

Iwagumi bowl

Fisheye view

Iwagumi bowl

Shoal of Galaxy Rasboras

With these updates, I am done with this article. Unless there are any major changes, this article is complete.
Thanks for your time.