View profile

Can you spot the Bug in the code?

Can you spot the Bug in the code?
By Apoorv Tyagi • Issue #3 • View online
Welcome to the third issue ofย The Trojanโ€™s Wednesday Wisdom newsletter.ย I hope you all had a productive last week and haveย started naming your variables well ๐Ÿ˜€
Hereโ€™s what we will be doing this week :
  1. Youโ€™re going to help me in finding the bug in my code.
  2. I will be sharing one mind blowing python tip with y'all.
So, Grab a coffeeโ˜• and Letโ€™s get started.

๐Ÿž Find The Bug
Theย first issueย of this newsletter started with โ€œHello World!โ€. So I decided to print those 2 words usingย JavaScriptย by creating functions like this
โ€ฆexcept it fails with a runtime error๐Ÿคทโ€โ™‚๏ธ.
But whatโ€™s going on?๐Ÿคฏ
Can you spot the mistake or Whatโ€™s missing ??
TypeError: (intermediate value)(โ€ฆ) is not a function
๐Ÿ“ฉย Reply to this e-mail if you know what is wrong with this code๐Ÿ˜‰
Meanwhile letโ€™s do something which works for us i.e Python๐Ÿ
๐Ÿ’ป howdoi
Stuck on a coding problem?
Need to check Stack Overflow, but donโ€™t want to leave your terminal?
howdoiย is a command-line tool made just for that. It gives the answers to all sorts of queries related to programming and coding like getting help in syntax, searching for libraries, resolving errors, etc., while working directly from the command line๐Ÿ”ฅ
Be aware though โ€” It scrapes code from the top answers on Stack Overflow & It might not always be the best information. Also, you need an internet connection for using howdoi.
๐Ÿคฉ It also supports many Optional arguments which might come pretty handy at times :
  • -a, โ€“allย display the full text of the answer
  • -l, โ€“linkย display only the answer link
  • -c, โ€“colorย enable colorized output
  • -j, โ€“jsonย return answers in raw json format
  • โ€“save, โ€“stashย stash a howdoi answer
  • โ€“viewย view your stash
  • โ€“removeย remove an entry in your stash
  • โ€“emptyย empty your stash
  • -n NUM, โ€“num NUMย number of answers to return
how do i for loop in python
how do i for loop in python
how do i undo commits in git
how do i undo commits in git
๐Ÿ‘‹ Thatโ€™s it for this week. I hope you enjoyed what I included this time.ย Consider subscribingย in case you havenโ€™t already and share this newsletter with those you feel can get benefit out of it.
See you on the Internet next Wednesday!
Did you enjoy this issue?
Apoorv Tyagi

๐Ÿ“ฉ ๐—” ๐—ป๐—ฒ๐˜„๐˜€๐—น๐—ฒ๐˜๐˜๐—ฒ๐—ฟ ๐—ฎ๐˜ ๐˜๐—ต๐—ฒ ๐—ถ๐—ป๐˜๐—ฒ๐—ฟ๐˜€๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป ๐—ผ๐—ณ ๐๐ฌ๐ฒ๐œ๐ก๐จ๐ฅ๐จ๐ ๐ฒ, ๐๐จ๐ง-๐…๐ข๐œ๐ญ๐ข๐จ๐ง ๐๐จ๐จ๐ค๐ฌ ๐—ฎ๐—ป๐—ฑ ๐’๐จ๐Ÿ๐ญ๐ฐ๐š๐ซ๐ž ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ๐ข๐ง๐ .

๐๐จ, ๐ฐ๐ž ๐๐จ๐ง'๐ญ ๐œ๐ฅ๐š๐ข๐ฆ ๐ญ๐จ ๐ฆ๐š๐ค๐ž ๐ฒ๐จ๐ฎ ๐ฌ๐ฆ๐š๐ซ๐ญ๐ž๐ซ ๐ž๐ฏ๐ž๐ซ๐ฒ ๐ฐ๐ž๐ž๐ค. ๐Ž๐ง๐ฅ๐ฒ ๐ฌ๐ฎ๐›๐ฌ๐œ๐ซ๐ข๐›๐ž ๐ข๐Ÿ ๐ฒ๐จ๐ฎ๐ซ ๐ข๐ง๐ญ๐ž๐ซ๐ž๐ฌ๐ญ๐ฌ ๐š๐ฅ๐ข๐ ๐ง ๐ฐ๐ข๐ญ๐ก ๐š๐ง๐ฒ ๐จ๐Ÿ ๐ญ๐ก๐ž ๐ญ๐ก๐ซ๐ž๐ž ๐ญ๐ก๐ข๐ง๐ ๐ฌ ๐ฆ๐ž๐ง๐ญ๐ข๐จ๐ง๐ž๐ ๐š๐›๐จ๐ฏ๐ž!

P.S. It is free (and probably fun)

Tweet ย ย ย  Share
In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Powered by Revue