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 ??
HINT:
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
Examples:
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!
-Apoorv;
Did you enjoy this issue?
Apoorv Tyagi

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

๐—ฅ๐—ถ๐˜€๐—ฒ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐˜๐—ผ๐—ฝ ๐Ÿญ% ๐˜„๐—ถ๐˜๐—ต ๐—ถ๐—ป๐—ฐ๐—ฟ๐—ฒ๐—บ๐—ฒ๐—ป๐˜๐—ฎ๐—น ๐—ด๐—ฎ๐—ถ๐—ป๐˜€ ๐—ถ๐—ป ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ธ๐—ป๐—ผ๐˜„๐—น๐—ฒ๐—ฑ๐—ด๐—ฒ ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—บ๐—ผ๐—ป๐˜๐—ต.

๐—๐—ผ๐—ถ๐—ป ๐˜‚๐˜€ ๐—ฎ๐—ป๐—ฑ ๐Ÿญ๐Ÿฌ๐Ÿฌ+ ๐—บ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ๐˜€ ๐ญ๐จ ๐ข๐ฆ๐ฉ๐ซ๐จ๐ฏ๐ž ๐š๐ฌ ๐š ๐๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ž๐ซ ๐—ฎ๐—ป๐—ฑ ๐ญ๐จ ๐ ๐ž๐ญ ๐ญ๐ก๐ž ๐›๐ž๐ฌ๐ญ ๐ญ๐ข๐ฉ๐ฌ ๐š๐ง๐ ๐š๐ซ๐ญ๐ข๐œ๐ฅ๐ž๐ฌ ๐—ฑ๐—ถ๐—ฟ๐—ฒ๐—ฐ๐˜๐—น๐˜† ๐˜๐—ผ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐—ฏ๐—ผ๐˜… ๐Ÿ“ฉ

P.S. It is free (and fun!) :)

Tweet ย ย ย  Share
If you don't want these updates anymore, please unsubscribe here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Powered by Revue