Under Construction (part 2/2)

In the previous post, I briefly recap the effort I have made to build a personal website. As you can tell from my previous work, I’m super into Sphinx-doc tool and I’m seeking to build a website that is more suitable for industry professional. So, this post is more about technology selection and what’s going on with my endeavor now.

“Everyone should have a blog”?

There is a tendency for person who works in tech industry: they love to blog about the technology. I’m not indicating that I’m against this tendency. In fact, I’m super into this idea. That makes programmer life much easier. When we run into technical questions, we can google and usually the solution is presented by some nice guy’s blog post. However, I’m not sure if making blog post is a great way to systematize your knowledge. Let’s take “Minimal Emacs Tutorial” as an example. Let’s imagine how we can translate this article into a blog post. “Learn about Emacs” section can be a post and then I tag it with “emacs-terms”, “emacs-commands”. “HowTos” section is separated into multiple posts because each howto is collected on different dates and as a blogger, I would make a blog post each time I found something new with emacs usage. The tags for “HowTos” section posts may be “emacs topics”. Now, if I want to take a look at what I have learned on Emacs, then I three operations: click on “emacs-terms” to find the posts with this tag, then “emacs-commands”, and finally “emacs topics” to traverse through the all emacs-related posts. As you can see, this is tiresome. Some may argue that this issue can be fixed if we add a theme tag, like “emacs” to every emacs-related post. This can workaround the problem but we need to be very careful about how we choose the tag.

That being said, however, I think making technical blog post’s advantage outweighs its disadvantage. Most important thing about writing blog is that you can keep track of your progress daily. I have been making my personal knowledge base for more than a year. I’m pretty satisfied with what I have accumulated so far. However, there are some caveats. Off top of my head,  I need more direct visualization of my progress. I want to see if I can pick up something new daily and that will give me a lot more motivation to push myself to learn more each day. In addition, some page can get enormously long. I have a page called “Collection of algorithms”, which takes like forever to scroll from top to bottom. This page is naturally suitable for blog post by making each algorithm into a post. Lastly, for marketing purpose. Making a technical blog post daily is an enormous effort and it will definitely look good for hiring managers – “Zeyuan is passionate about technology!”. Even though I can showcase my private knowledge base, that is much more inconvenient than a blog post that can be accessed by everyone.

You know you have a wordpress blog, right?

Yeah, I know. WordPress.com is a great place to write blogs. It makes me want to write something each month. However, I want to say writing technical posts on wordpress.com is sort of painful. In general, if you need to insert code, you need to work with “HTML” editor and use

[sourcecode language="csharp"]
//your code comes here
[/sourcecode]

This format is incompatible with reStructuredText. That means the content written here cannot be rendered using Sphinx-doc engine. That essentially makes the portability of the post to the minimum. In addition, I experience some weird bug when insert the source code. Inside “Sqoop2 7 Minutes Demo with DB2” post, I use lots of SQL statements inside the code block. Everything works fine the first time. However, when I try to update the post, all the quotation marks get translated to the html representation under “Visual” editing tab. I have to manually update all the quotation marks to its symbol form.

However, on the other hand, wordpress.com blog works best with photos. I really enjoy how wordpress.com manage photos in my “Trip in Nan Jing” and “First Time Ever Hackathon” posts.

What should use?

This is the question that I have been looking into for months. Let me list my expectation first:

  • Support reStructuredText
  • Static pages should be fine and must feel LIGHTWEIGHT
  • Support basic blog functionality – tags, categories, post date

Let’s list out what commonly-seen options are:

  • Octopress
  • hexo
  • Sphinx-doc
  • Pelican

Let’s cross Octopress first. I don’t want to touch Ruby ecosystem because the workflow to develop a personal site will completely be different. In addition, there are plugins that let Octopress support reStructuredText but I figure that doesn’t offer full capability like Sphinx-doc does.

Hexo is another beast. It is similar to Octopress in the sense that both of them use Markdown as their major language and it is also rooted in front-end world. I admit Node.js is a pretty cool language and the theme provided by Hexo looks amazng. However, it feels too modern to me and I want to take a little bit more conservative path.

I want to talk about Sphinx-doc and Pelican all together. Sphinx-doc is the foundation to write Python documentation and Pelican is based upon Sphinx-doc and tweak towards blog post. Tweaking Sphinx-doc towards a blog post site requires a fair amount of knowledge of Jinjia2 and some Javascript knowledge. I don’t have enough time for that. So that makes Pelican very tempting. However, I don’t want to use it for now as the workflow and how to control the Pelican behavior is quite different from Sphinx-doc. However, it is definitely worth revisiting in the future just because the size of community and plenty of themes.

The engine I choose is called Tinkerer. It’s the direct derivative of Sphinx-doc and the workflow doesn’t deviate from the standard Sphinx-doc workflow too much and the setup is quite the same. However, the latest release is back in 2014. That makes me a little worry. But let’s stick with this for now. I can easily switch to Pelican whenever I want to.

What does look like right now?

I’m not going to abandon this wordpress blog. However, I’m going to tweak the direction of the blog posting on this site. From now on, I will keep technical blog post to the Tinkerer-powered site. By technical, I mean that involves code, mathematical expression, and the content that will be part of my knowledge base doc eventually. However, on the other hand, all the life thoughts and any other non-technical posts will still be kept at this site, especially those posts involve lots of non-technical pictures. zhu45.org will still work as the main portal to my personal site until the new Tinkerer-powered site is GAed.

 

Advertisements

Under Construction (part 1/2)

Well, it’s almost the end of November and I haven’t posted anything yet this month. I feel pressured. Lots of things are actually going on this month, which involve my cat, my future career path, and some mentality struggles. I’m not gonna write about them right now because it’s not the right time. Hopefully, I can write about them someday in the future. I cannot promise this.

Today, I can actually write about is my “little” project I just started – building a site. Let me take a break here and give a quick recap. Up till now, building a site or, more specifically, a personal website seems to become my life-long effort.

Everything gotta start from somewhere …

If you are willing to take a quick look, Welcome to Zeyuan Hu’s World! is actually my starting point. I built this site during the summer time of my sophomore year at college. By that time, I was granted a summer research position and my main duty was to help out professor to do computer simulation of some mathematical models. I was just done with my first cs course – CS 302: Introduction to Computer Programming with Java and I heard from my uncle about this Python language. I have no clue among all those programming languages, Python caught my eyes during that time: probably, because of its cool name. So, I decided to give a serious shot at learning Python programming language both for my research job and for my personal interest.

It’s pretty damn hard to pick up a natural language by just skimming the textbook. This also applies for programming language. So, I decide to make notes while I study the Python. Making notes on paper is an option but paper is really hard to carry and easy to lose. When I read about the Python API, I’m pretty impressed by the elegance the Python official website shows and how it can keep everything so well-organized. So, I decide to use Sphinx-doc to make my own site with the main purpose to host my Python study notes. That’s how everything got started.

Making this site allows me to pick up CSS, reStructuredText, Python, and Matplotlib (which I used the library to make the header image of the site). If I evaluate this site under my current level, it’s still a solid website. Even though the aesthetic level may not be high, but the site serves my main purpose well – I got a well-written Python study notes for myself. The downside of this site comes from my personal feeling. I’m definitely not a front-end expert but I can tell this site feels quite HEAVY. There are multiple tabs (i.e., home, projects, cv/resume, and so on) but they are sort of hidden in the way that people have to click through the tab to find the content. This works great if I have accumulated tons of material to demonstrate. However, we both know, this is not the case. Another point is more of a pity. I can no longer maintain this site. My wisc computer lab account id got deleted after I graduated. I still feel grateful that school still hosts my site and that’s very moving policy I have ever encountered.

If you are interested, the source code for this site is hosted on Github. Feel free to check it out and there are some advanced reStructuredText and Sphinx usage in the repo.

Struggles …

My second journey with my site starts shortly after I begin to work at IBM. During the work, I feel the need to build my personal knowledge base. This is mainly  due to the amount of new information you need to keep track of for future use. I feel this is super important for someone who just joined the team and eager to make contribution to the project. At first, I use Sphinx-doc to build up my personal docs like I did previously. This doc or site is not available to public because there is no clear cut between confidential and non-confidential information. For instance, when you try to record the gain from code reading, even though C++ technique is perfectly fine for the public but if we put it under the context of DB2 source code, then the technique combined with DB2 source code is completely confidential. I don’t want to cross the line here. However, every coin has two sides. If some knowledge is completely fine for the public, then I want to share them out. So, building a website once again becomes a task that I need to finish.

I don’t want to get serious engagement with web development (even though I made a try) and on my preference ranking list, easily recording knowledge in a neat way comes first. I don’t want to spend tons of effort working on the web as I feel like understanding database and mastering algorithm sound more fun to me.

Under this criteria, I made some prototypes. The first one is built upon the previous iteration (sphinx-doc web) but incorporates bootstrap framework to make the whole site mobile-friendly and have a modern taste. This one is definitely better than my previous one. I liked it a lot when I first got the prototype out. However, I quickly felt the pain or the pressure of the writing, more precisely. The main purpose is to document my knowledge picked up from the work and it meant to be less reader-friendly. I have to edit some writings in order to make everyone online can make sense out of it. Plus, make distinguish between confidential part and non-confidential part can make this editing thing even worse. More importantly, I still think this site is HEAVY, especially for Chinese because it takes quite a while for everything loads up properly (google-analytics, github servic, and so on). So, I give up. I’m not giving up making my knowledge base but  I give up to make everything public. Meanwhile, I also cleaned up the very first web and adjusted the style a little bit. Unfortunately, this site doesn’t attract me as well.

Before the dawn …

The site I’m currently using is absolutely hideous for my friends (believe me, none of my friends really like it). The main argument they is that this site is just plainly 70s style: it doesn’t even have tabs. That’s true. In fact, that’s kind of the style of I’m seeking: everything is just there. You don’t have to dig the site to find the things you want. Plus, it is super LIGHTWEIGHT. I think this site is perfectly fine for someone who works in the academia: all the publications can be directly seen. In addition, I use a “hybrid architecture” for this site in the sense that I use this site + wordpress blog to host all my writings. By that time, I couldn’t find a proper solution to build a blog post website based on Sphinx-doc and I will talk more about this in my part 2 post.

Putting everything straight out to the reader works well for academia in my perspective. However, it becomes a downside as well: I’m working in the industry. I barely make publications. So, this site becomes really static :(. I hate to actively maintain a site but never update one does no good to me as well. This is actually why I write “This site is permanently under construction.” in my footnote of the page. I know someday I will once again to rebuild this site.

TO BE CONTINUED …

Chronological order of my work on building a homepage

南京旅行小记 (Trip in Nan Jing)

前言

十一长假结束后第一周是没日没夜的忙碌(其实没有啦)。这篇南京游记一直拖到现在才慢慢成稿。与其说这篇是游记,不如说是南京见闻记录(话说这两者真的有区别吗?!):只有我个人的观察感受,没有正经八百的景点介绍(毕竟网上多的是)。那么咱们闲话少说,这就开始。

南京南站 + 南京地铁

img_2527

我们(和我母上)从北京南出发乘坐和谐号于上午11时许到达南京南站。整个南京南站从站台上来说与北京南站并没有很大不同。整个站台和南京地铁完美的衔接在了一起。我们出了站并没有走太远就可以进入南京地铁。这次我们订的酒店是在南京夫子庙地区,所以从地图上来看,乘坐1号线最合适。来到地铁,我发现南京地铁和北京地铁一个不同是,南京地铁是没有人工售票的。有只是一个服务台,对乘客提供帮助。所以我和我母上只能硬着头皮去自动售票机买票。在我们选好我们的票数及目的地的时候一个惊人的一幕出现了:我和我母上在等着硬币找零,但是首先掉下来的是我手上拿着的这个玩意,没错,这就是南京的地铁“票”。这个小东西你只要在进站的时候刷一下,在出站的时候放到特定的卡槽里可以了。“这也太容易丢了吧!”
img_2529

在站台等待的时候,我发现站台荧幕上播的是确确实实电视台的节目而不是专门为地铁定制化的一些短片。为什么我会知道这点呢?因为屏幕上播放着“猫捉老鼠”并挂着“江苏卫视”的台标。这让我有点小期待,会不会“非诚勿扰”也会在上面放着呢?

img_20161009_082518南京地铁和北京地铁除了在“票”的设计别出心裁外,在列车自动语音播报上与北京地铁也有些许的不一样。如果说北京地铁是美声的话,那么南京地铁语音播报就是流行音乐了。整个语速比北京地铁不知道快了多少拍。从出战播报到提醒给老幼病残孕让座到下一站提示总过说完也就10秒左右。不仅如此,南京地铁也在语音中将商业开发做到了极致。举个例子。在播报中南京地铁会这样说道:“南京银行提醒您给老幼病残孕让个座。前方到达中华门站,此战可到达南京大排档,环球雅思。” 这短短的十几秒的语音播报中就给“南京银行”,“南京大排档”和“环球雅思”这三个企业做了广告。这商业开发能力实在是高!而且,我发现“提醒您”这句的广告位基本上都是给银行了。什么“南京银行”, “徽商银行”, “工商银行”。每隔几站就会换一个银行蹦出来提醒你该让座了。关于语音有意思img_20161007_113711的还不止这一点。北京地铁的语音是全程女声的。然而南京地铁是男女声交替的。这也给我一种耳目一新的感觉。

南京地铁有意思的地方还不止这一点。在南京地铁车厢里的路线图上其实是有这么一行小字的:“鼓楼,新街口,三山街,天隆寺至小龙湾,天印大道至中国药科大学设有卫生间” 这让我意识到南京地铁原来不是每站都会设有卫生间的。这点确实有点出乎我的意料。最后,南京地铁在出站口的标识上是采用阿拉伯数字1,2,3,4的,而不是像北京地铁采用英文字母A, B, C, D的。这些让我意识到一个个小小的地铁就能体现出两个地方如此的不同。

南京市区

出了地铁站,我们终于接触到了南京市区。其实南京市区和北京并没有太大的不同。如果硬要说的话,就是南京自行车道和人行道不做太大区分这点上了。从图片上就能很明显的看出,人行道其实和自行车道是在一个平面上。人行道并没有突出来。这让我们最开始非常的不适应,因为你走着走着就会发现你已经走在自行车车道上,而对面正有一辆摩托朝你迎面冲来。

img_20161007_114938说道摩托,不像北京地铁站门口停满的是三轮摩的,南京地铁门口停满的是摩托。而大街上开这种摩托的人感觉和骑自行车的人数是差不多的。南京人民对摩托看来是真爱呀!

img_20161009_083938

吃吃吃!

提到南京小吃就不能不提鸡汁汤包和鸭血粉丝汤了。我们在南京找到了一家名字叫“鸡鸣汤包”的小店。按照店里的介绍,这加店前身是南京鸡鸣酒家。在上世纪50年代在原苏式汤包的基础上,运用传统的发面工艺,精选上等猪前腿肉,配制精心熬制的汤汁,研制出皮薄汁多,口感甜中带咸,咸中带鲜的汤包。后来我和我母上换了一家去吃,口味就完全不一样。

后来,我们又去“南京大排档”去吃了南京经典小吃“古法糖芋苗”,“蟹黄豆腐”,“蜜汁糖藕”,“酒酿元宵”。但是我个人还是觉得“鸡鸣汤包”这家最赞!不仅味道好,我和我母亲点了两碗“鸭血粉丝汤”和两屉“鸡汁汤包”才花了50块不到。这性价比简直不要太高!

玩玩玩!

我们这次南京去了“夫子庙”,“中山陵”,和“玄武湖”。总结一个字就是:“累”。“夫子庙”其实是一个超大的步行街区域。里边有卖各种南京小吃以及小商品,当然还有孔夫子庙。我们第一天去那里从下午两点多走到了八点多。整个人一天下来是虚脱的。可是,这只是热身运动,第二天的“中山陵”才是真正的挑战,整个“中山陵”其实是一个超大景区。我们去了“中山陵”,“音乐台”,“美龄宫”,“明孝陵”以及“灵谷寺”。整个一天下来我微信走了三万八千多步。而最后一天的“玄武湖”就是一个超大的中心公园。其实主题和前两天没有任何区别就是“走”。我就随便放点图吧。

This slideshow requires JavaScript.

最后欢迎大家关注我老妈的新浪微博:www.weibo.com/u/5617018681 !

First Time Ever Hackathon

I have never been to hackathon before. In my imagination, hackathon is like a festival for people who have passion about creating cool stuff during a limited amount of time. Hackathon is going to bring tons of fun if you can work with dedicated people on some interesting idea and try to make the idea into reality. Luckily, Early Professional Hire (EPH) Hackathon event hosted by China Development Laboratory (CDL) meets my expectation perfectly.

Experience Recount

When I first time heard about the hackathon on EPH Day 5, I’m a little intimidated. This is because the solution demo you present at last needs to fit in certain hackathon topics. The topics include business platform innovation, light-weight e-commerce reinvention, blockchain, application of Watson technology into medical services, and integration of Watson technology with 3D demonstration. All these topics are super cool, very advanced and I barely have a chance to get touched in my day-to-day work. So, I’m not sure if I can handle those topics well. However, I want to give this hackathon a shot: not only because this is part of EPH program but, more importantly, one of the topics really catches my eyes- that is, the integration of Watson technology with 3D demonstration.

This topic actually has a name, which is called Watson Introspector. It is a cognitive tool for understanding software, answering questions, and interacting with software architecture and data flows in 3D.  This topic suits my interests perfectly. It has always been a challenge for new comers to study a code base especially when the code base has been evolved for several years. What sets of functions or data flows get involved in certain feature of the software has always been the type of questions we are asking all the time, especially when bug fix or enhancement request kicks in. Conventionally, there are tools to help us to visualize the code path like debug trace, UML graph, and so on. However, none of them are straightforward and fun to use if we put them under new comer education context. I can hardly imagine some guy will choose staring at the debug trace on Friday night over going out for a date. So, I think the visualization of code path in 3D and get some question answering system integrated (like Watson) may probably make our software developer’s lives much easier.

After I set the topic that I want to work on the most, the next step is to get a team. Originally, there are four team members besides me within the team. All of them don’t have any experience with any technology involved in the topic. This is perfect because neither do I. However, all of them are testers, which make my situation a little bit difficult. This means that  I am the only developer in the team and I will take much more responsibility than I thought I would. But, that’s OK because my teammates want to grow with me and want to give the hackathon a try. So, I become the captain of the team.

Everything goes quite well for the first two weeks. We narrow down the architecture of the solution: we are going to make a 3D space game just like the classic snake game. In the study mode, player is free to explore the 3D world, which is constructed from the classes and functions parsed from a random-selected Java project. Inside the world, the player can interact with Watson on what kind of feature he wants to learn and Watson will return a code path that best meets the player’s request. Then player can spend his time getting familiar with the call stack of the functions along with the purpose of each function. In the test mode, the player is required to visit the functions he just studied in the correct function call order so that he can win the game. Our goal of making this game is to offer a fun way to learn about a source code project and we believe educational game best suits our needs.

Then, on September 14th, everything is just changed. Once we settle down the architecture of the solution, two members decide to quit with the excuse of limited time. I got this feeling that someday they are going to quit but I didn’t expect this timing. They refuse to work on the solution outside of the work time. This makes me quite frustration because anyone who attends hackathon should expect that he is going to spend fair amount of time outside of work to finish a demo. Even worse, this means we probably don’t have enough resources to finish our solution. It looks like mission impossible with only one developer and one tester left with the team.  But, a second thought comes into my mind. I work as the president of IBM Diamond & Ring Toastmasters Club. One important lesson I learn from it is that as a leader, the first priority task is to take responsibility and get the job done no matter how difficult the situation is. Under my current situation, my goal is to at least finish this hackathon, and I need to make this happen. Plus, I’m not alone: I still have a teammate, Rachel, who wants to give out all she has in order to succeed in the event. I just cannot let her and myself down.

In the final week,  we work super hard with our adviser, Trent, in order to get a demo working.  Even during Mid-Autumn Festival holiday, we still come to the office around 2 pm in the afternoon and hack through the rest of day to 1-2 am. That has been the theme for the whole week. On Tuesday, September 20th, right before the final day, we work over 30 hours to 4am, September 21th to do bug fix and 3D modeling. Rachel and Trent live closer to the office, so they rush home to get some sleep. I, however, live really far away from the company (I live southern 4th ring of Beijing) and unfortunately, I have to take a nap at the office coach to avoid being late for the team show order decision draw happened four hours later.

Even we almost live inside the company, we still haven’t finished our demo on the final day morning. There is some performance issue with our game during the launch phase: since we talk with Watson at the same time the game assets are loading, the framerate of the game drops significantly. In addition, we haven’t figured out a way to grow our character body just like the classic snake game. These put a lot of pressure on me because there isn’t enough time to fix everything in a nice clean way. However, we somehow manage to finish all this by the demo time. We adopt agile practice. Maybe we cannot fix these problems nicely but we can definitely walk around the problem just for the demo’s sake. We do incremental world object construction during the game loading phase: we only load the objects that player can actually see through the camera and we use a big skybox to block unloaded part of the world from the user. For the snake body problem, each time the character hits the target, we put a sphere behind the character and we somehow manage to let the newly added part follow the movement of the character. Maybe the movement doesn’t mimic the snake body movement nicely but for the sake of demo, that’s enough.

During the demo time, everything works well. Thanks to the public speaking practice I have kept doing at the toastmasters club, I delivered a successful presentation to the senior management level at the lab and we obtained 2nd place in this hackathon with the fewest team members among all the contest teams.

Here are some interesting stats that are worth mentioning:

  • We have 0 experience with the technology stack of the hackathon
  • We originally have 4 team members but down to 2 halfway through the event
  • We only have 1 developer and 1 tester eventually
  • We only have 1 person with sufficient programming experience
  • We work to the super late nights for at least 3 days
  • The longest non-stop hacking lasts for 30 hours
  • We consumed 50+ bottles of water and bags of snack
  • We watched 60+ hours video tutorial on YouTube and safaribooksonline.com
  • We write 2500+ lines of code for the demo

 

Hackathon Takeaway

Always remember you’re the captain

There are couple of times I want to quit the event. Thankfully, I don’t actually do that because I always remind myself I’m the captain of the two-man squad. When you set a goal to meet, you have got to do whatever you can to reach that goal and get the job done. Thanks to this hackathon event, I can now clearly see this point.

Stay positive during the difficult situation

There are downtime during the whole hackathon event. Face the technology we only have never actually experimented with when we enter the contest; Two of the original team members leave the team; Unfamiliar with the development tool; Debug the code to the late nights … All these things can drag the moral down pretty quickly. However, I’m the leader, I cannot do this. So, even in these difficult moments, I try to call the team for a short break and entertain ourselves by coming up jokes or have some random chats. These techniques work amazingly well because we don’t feel stressed and we can actually enjoy the whole problem-solving process. Without fun, the hackathon will never be the same to me.

Don’t be afraid of making the tough call

To be honest, I’m the chief solution architect of our demo and sometimes I have to make some tough calls, especially when both options look tempting. For instance, implementing the game like the classic snake game or like Super Mario are both good options. However, if we put time and various other resource limit under consideration, two options cannot be the same. Super Mario has its advantage in 3D exploration and the snake game reflects the core idea of our solution – make the body grows with the code path. I have to make the tough call on what path we want to pursue and I have to say, it’s always not easy.

Motivation and hardworking is the key to success

Motivation will give you the courage to take your first action but only can hardworking make you reach the goal. In this hackathon, I feel lucky that I follow my interest and choose Watson Introspector as my topic to work on. My interest provides me enough motivation to power through the whole event. However, I know that in the deep of my heart, I want to win and I want to my demo to reflect the technical expertise we equip. That requires hard working. Thankfully, we don’t let ourselves down and we work super hard towards our goal. I’m so glad we finally make it.

Public speaking is crucial

I feel our solution may not use all these fancy technologies like some other group does but I feel the public speaking or the presentation skill well compensated for this “disadvantage”. During the presentation, I use numbers from above to define our hackathon experience with the speech style like Steven Jobs and our beloved CEO, Ginni Rometty. This delivers a concrete message to the audience: we come here to win and we deserve it. I want to give the judges the feeling that we are 120% confident with our solution and more importantly, we feel proud of it.

All in all, this hackathon has become one of the moments that I’m extremely proud of myself as an IBMer and I do learn a ton from it: not just technical stuff but how to be a leader as well.

I want to end my post with the slogan of our project:

Evolve ourselves, beyond the limit!

Linux Fork Bomb

Today, I learned a fun feature of shell called Linux Fork Bomb and this the piece of code I’m reading about:

:(){:|:&};:

Code Analysis

Let’s dive into this and have a little appreciation of the power of shell:

  • :() defines a function called :
  • :|: & runs function : , sends output to : and run in background
  • {...} indicates whatever inside is the content of the function :
  • : calls function for the very first time

Essentially you are creating a function that calls itself twice every call and doesn’t have any way to terminate itself. It will keep doubling up until you run out of system resources.

Some fun observation

: used as a placeholder in shell. For instance, while trueis same as while :. However, this may only work for bash because : is a built-in command for some shell and the buil-in command : has precedence over the function :. So, when we actually execute our bomb, built-in : will get executed instead of our function. So, bomb has been defused.

Here also offers  some insights on how to prevent fork bomb like this. It involves RLIMIT_NPROCIt is definitely worth to dig further.

You can watch a live demo and see how powerful the linux fork bomb can be.