Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

06-14-2016 , 09:07 AM
suzzer if you're having these kinds of problems consistently definitely make your own sublime snippets. I have a repo I've cloned dozens of times that has about 30 tab completions mostly for html that stuff like emmet won't handle well. Also I pretty standardly use control+m to check for proper closing tags. I'm a sublime fanboi so not sure if other editors are better about that stuff but it hasn't been a big problem in my experience.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-14-2016 , 11:15 AM
I tried command-m and control-m on a Mac - not sure how that's supposed to check for closing tags.

I've done some custom sublime stuff in the past. I will if I end up working with polymer a lot.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-14-2016 , 12:53 PM
control M jumps your cursor between opening/closing tags. also if you don't see the highlight around both while next to one definitely change your theme.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 08:22 AM
Been messing around with code academy intro to Ruby, to prepare myself for coding bootcamp and this thing bugs me:

Code:
print "Say something with an S!"
user_input = gets.chomp.downcase!

if user_input.include? "s"
  user_input.gsub!(/s/, "th")
else                               
  puts "There is no 's'"    
end
When I type with no "s" it promts an error: "undefined method `include?' for nil:NilClass"

Where is the bug? Or is it a bug withing app academy?

This is how it's supposed to look at the end of the chapter:

Code:
print "Thtring, pleathe!: "
user_input = gets.chomp
user_input.downcase!

if user_input.include? "s"
  user_input.gsub!(/s/, "th")
else
  puts "Nothing to do here!"
end
  
puts "Your string is: #{user_input}"
Where is the difference? Oh, and how can I put "" inside the string?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 09:26 AM
Quote:
Originally Posted by RV-
Been messing around with code academy intro to Ruby, to prepare myself for coding bootcamp and this thing bugs me:

Code:
print "Say something with an S!"
user_input = gets.chomp.downcase!

if user_input.include? "s"
  user_input.gsub!(/s/, "th")
else                               
  puts "There is no 's'"    
end
When I type with no "s" it promts an error: "undefined method `include?' for nil:NilClass"

Where is the bug? Or is it a bug withing app academy?

This is how it's supposed to look at the end of the chapter:

Code:
print "Thtring, pleathe!: "
user_input = gets.chomp
user_input.downcase!

if user_input.include? "s"
  user_input.gsub!(/s/, "th")
else
  puts "Nothing to do here!"
end
  
puts "Your string is: #{user_input}"
Where is the difference? Oh, and how can I put "" inside the string?
The documentation for #downcase! indicates the method will return nil if no changes are made. So, if the user input is already all downcased, your line 2 returns nil (user_input = gets.chomp.downcase!). And therefore you are getting the undefined method because nil does not have an #include? method. To get around that, you could just use the regular #downcase method.

And I'm not really sure what you're asking with the ' put "" inside the string', question. Literal quotations? Which string?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 09:44 AM
Quote:
Originally Posted by fredd-bird
The documentation for #downcase! indicates the method will return nil if no changes are made. So, if the user input is already all downcased, your line 2 returns nil (user_input = gets.chomp.downcase!). And therefore you are getting the undefined method because nil does not have an #include? method. To get around that, you could just use the regular #downcase method.

And I'm not really sure what you're asking with the ' put "" inside the string', question. Literal quotations? Which string?
Makes sense, thank you. Though I still have to learn about #include and "regular #downcase". These CodeAcademy lessons seem pretty strict in regards to creativity.

About the string. When I wrote:

Code:
else                               
  puts "There is no "s""    
end
It also showed an error.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 09:52 AM
Oh, just remembered. I've read a really interesting article on Silicon Valley, both the show and the Valley itself. I think you'll enjoy it.

HOW “SILICON VALLEY” NAILS SILICON VALLEY
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 09:53 AM
Oh gotcha. For that, you can just structure your string with single quotes around the whole thing, and then use double quotes like this:

Code:
# Single quote outer string, double quote inner string
'There is no "s"'
You could also do that the opposite way with double quotes on the outer string, single quotes inner string. But that may produce a slightly "wrong" answer for CodeAcademy's answer grader.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 10:06 AM
Learning a bunch of UNIX scripting has warped my ruby memory, but you could also escape double quotes inside of double quotes, right?

Can you escape single quotes inside single quotes? It's just UNIX/bash/awk or sed or whatever that doesn't like one of the two of those I think.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 10:35 PM
Yeah you can escape both double/single..

grats Suzzer 100% coverage, wow
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 11:29 PM
Quote:
Originally Posted by RV-
Oh, just remembered. I've read a really interesting article on Silicon Valley, both the show and the Valley itself. I think you'll enjoy it.

HOW “SILICON VALLEY” NAILS SILICON VALLEY

this fb ad referenced in the article is amazing:

https://www.youtube.com/watch?v=Taq6U97uqvE

it's legitimately hard to imagine that this wasn't the attempt of some ballsy, ironic ad man they hired to see how far he could push the envelope of vacuous pretension and still get paid....
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2016 , 11:37 PM
First week in Silicon Valley working as an intern. Haven't been fired so I got that going for me.

Really liking the vibe here. Palo Alto is such a beautiful city. It's a bike friendly community. I even started biking to work today. You always see people biking to places. You never see that in Orange County.

Everyone I have met so far is an engineer of some sort. It's weird being surrounded by so many smart people.

Now if they can somehow make rent be cheaper, that would be great.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 12:06 AM
First intern assignment: take the Google bus up to SF, tell everyone you meet you work in tech and don't understand why there are so many smelly homeless people everywhere. Report back.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 12:52 PM
They get that out of the way in orientation now.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 01:35 PM
Does anyone have any idea how to read these timeline things in Chrome (the one on the top and the one on the left)?



Specifically - how can you tell what's blocking something else from loading and what's being loaded in parallel? Also how is the thing on the top even remotely useful if it's just a bunch of time blocks you can't drill down into to see what it goes with?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 01:49 PM
Ok well I googled that for myself and am learning some things. https://developers.google.com/web/to...cific-resource



Clicking on the main thread section in the timeline (green bar above) reveals the breakdown of the different parts of it loading.



So TTFB = time to first bite. Apparently 200ms is good. 1.5s is bad. I've seen 5-30 seconds out of 2p2. Something is definitely lagging.

Lol at me never needing to learn this for my job, but learning it to prove 2p2 is being laggy.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 02:34 PM
Have you written a line of code for your new job?

I need a new project or something, hopefully something that can turn into a business or at least make some passive income. Now that I have enough fullstack and sysadmin experience what should I do, any thoughts? Show up at an "entrepreneur meetup" and listen to pitches?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 03:17 PM
Well I did POC the hazelcast-node client which took about a half-day - mostly trying to get their unpublished developer version running. And I am starting to POC docker/kubernettes (on my own volition). But other than that no. It sucks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 04:37 PM
Quote:
Originally Posted by Grue
Have you written a line of code for your new job?

I need a new project or something, hopefully something that can turn into a business or at least make some passive income. Now that I have enough fullstack and sysadmin experience what should I do, any thoughts? Show up at an "entrepreneur meetup" and listen to pitches?
I went to a few of those meetups. To say the least, they were less than inspiring. Great for keeping count of how many basic business fallacies they parrot as plain fact. Everyone describes their "equity" as "I only need to get 1% of this multi-billion market. How hard can that be?" ** and uses that pitch to get free work from you. No one needs database work, and I'd guess they all use Heroku or copy/paste Digitial Ocean for sysadmin work, but RoR and mobile development is hot.

One founder called me "low quality" and continuously insulted my work. I really laid into him. and It's possible I burnt a few bridges after that back-and-forth.

** https://successfulsoftware.net/2013/...rcent-fallacy/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 04:59 PM
yeah can't imagine what kind of douchebags go to these but it could be worth a laugh.. I'll try anything once.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 05:06 PM
may have just got a rejection email from a company I applied to


...in 2014.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 05:48 PM
We thought it over, and we decided you STILL can't work here. SUCK IT.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 05:52 PM
After careful consideration, we have decided to go in a different direction...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 06:35 PM
that's cool, I wouldn't want to wait so long for their bicentennial performance reviews
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2016 , 07:59 PM
Quote:
Originally Posted by Barrin6
First week in Silicon Valley working as an intern.

Now if they can somehow make rent be cheaper, that would be great.
Proving again that the money men are smarter than the smart people.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m