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

04-13-2017 , 02:32 PM
Quote:
Originally Posted by kerowo
How do you know you're not in a loop or a conditional? Seems like FPS.
I know because I know? Not sure how to answer that, but I'll take a stab. Based on your asking the question, it would seem that if you see indented code of your own you know you are either in a loop or a conditional. When I see indented code of my own I know that I'm in a loop, a conditional, or file I/O.

I don't believe it's FPS at all, and I believe it stems from the fact that, around 25 years ago, I had a teacher that very forcefully ingrained on us students that, when we're dealing with file I/O, we get in, and we get the hell out of the file as soon as is absolutely possible. So the indentation is a reminder that, hey, we're working with a file right now, so every line of indented code here better need to be done while the file is still open, if not, move it up to before the file is open, or down to after the file is closed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 02:44 PM
I was thinking something else, what jj showed looks standard.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 02:57 PM
I was just sort of kidding to be honest (Python humour is the best humour).

I'm not really sure I like the general approach of indenting when the file is open. But I guess the idea is reasonable. If you're dealing with something where it really matters it might make more sense to structure your code in a way that makes it clear what to do.
Something like you open the file, pass it to a method that does whatever its suppose to do, and then immediately close the file after.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 06:36 PM
Code "showing a file is open" sounds to me like it should be it's own function. If for any reason you don't want to do this, privately scope it within the method is what I'd do if it's not naturally done already (eg with a using(){} block)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 08:31 PM
How do you guys feel about else if's on the same vs next line as the previous ending curly.

As in this:
Code:
if (a) {
    x();
} else if (b) {
    y();
} else if (c) {
    z();
} else {
    q();
}
vs

Code:
if (a) {
    x();
}
else if (b) {
    y();
}
else if (c) {
    z();
}
else {
    q();
}
I've always been a staunch proponent out of the latter, but I think I get the argument for the former.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 08:53 PM
For me, the latter, since I want to see the if and corresponding else words to be vertically aligned.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 09:04 PM
Former. Definitely the former.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 09:05 PM
Quote:
Originally Posted by jjshabado
Former. Definitely the former.
Obv.

also: remove the damn braces

Last edited by gaming_mouse; 04-13-2017 at 09:22 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-13-2017 , 09:06 PM
Sometimes I feel like a ******. Spent 3 hours trying to figure out why my local DynamoDB instance wasnt working, I was giving it dummy access tokens in 2 spots, with 1 character different, which apparently means it was writing to one spot and reading from another... Sigh
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 02:27 PM
NYC bans employers from asking interviewees about previous salary

I was surprised to see that Philadelphia and the entirety of Massachusetts already have laws against that, didn't know it was a thing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 02:35 PM
Also, Slack switched to TypeScript and they love it!

Quote:
Along the way, we made two surprising discoveries:

First, we were surprised by the number of small bugs we found when converting our code. Talking to other developers who began using a type checker, we were delighted to hear that this was a common experience: the more lines of code a human writes, the more inevitable it becomes to misspell a property, assume the parent of a nested object to always exist, or to use a non-standard error object.

Second, we underestimated how powerful the editor integration is. Thanks to TypeScript’s language service, editors with an autocomplete function can support the development with context-aware suggestions. TypeScript understands which properties and methods are available on certain objects, enabling your editor to do the same. An autocomplete system that only uses words in the current document feels barbaric afterward. Gone are the days we find ourselves on Google, checking yet again which events are available on Electron’s BrowserWindow. Plugins are available for Atom, Visual Studio Code, Sublime, and nearly every other editor out there. Being able to validate our code without leaving the editor boosted our productivity immediately.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 11:00 PM
Contract and contract to hire salaries should be higher than the corresponding positions salary to compensate for no benefits shouldn't they? Had a place offer 3k a month for a 3 month contract to hire position, for someone with 7 years experience in the role how ridiculous is that?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 11:12 PM
Dude I got offered 65/hr by charter. And they stink. Def keep looking
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 11:44 PM
Quote:
Originally Posted by kerowo
Contract and contract to hire salaries should be higher than the corresponding positions salary to compensate for no benefits shouldn't they? Had a place offer 3k a month for a 3 month contract to hire position, for someone with 7 years experience in the role how ridiculous is that?
uh $36,000/year are you serious? "I'm not a good fit for this role sorry".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2017 , 11:55 PM
Quote:
Originally Posted by Grue
uh $36,000/year are you serious? "I'm not a good fit for this role sorry".
Yeah, I thought it might have been a typo or something but they doubled down on it and then gave a cap for the position that indicates they are looking to pay Tier 1.5 support money for a senior support/operations role. What's got me confused is that I was referred for the position by a member of their board, so I don't know if they aren't interested but want to tell the board member I said no or are just clueless in hiring.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 12:53 AM
Gonna go totally out on a limb and guess whoever is involved in hiring/budgeting that role has experience using offshore support and is using that as a basis for their target.

I could almost convince myself someone competent could be paying 1/4 that a month for offshore and is trying to do a conversion.

But I think you should obv tell your friend on their board that they made a lol lowball offer and it seems like they don't get it. He should know that if he's referring people to the position and gives a **** about the company.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 12:58 AM
yeah, I have an email set for when it's finalized that I'm going to send him. I'm of two minds sending him something while negotiations are still going on, seems like snitching and a bad way to start off in a <20 person team to go over their head to the board, but no way they're going to get quality devs doing this ****.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 11:10 AM
We pay our good interns more than that.
Hell, at my last company we paid our data entry people more than that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 11:24 AM
Yeah, I sent an email to their CEO and my Board member friend to point out their processes are flawed and hopefully restart the conversation above this guy who was doing the hiring. Doubt it will do much for me but maybe they'll fix their process before they are trying to hire developers.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 02:01 PM
First project was due yesterday at the bootcamp. Had to build a basic crud tic-tac-toe app.

Ended up helping a lot of people with theirs, figuring out how to build required features with various unique implementations of simple concepts really helped my understanding immensely.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 02:24 PM
We have to use spaces at a big company with a lot of churn and outsourcing. Otherwise someone will pollute the tab-based indentation with spaces. You have to become the space police. Well this was pre-CI/CD w/linter days. I guess we could do it now but it's too late.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 05:06 PM
Quote:
Originally Posted by Larry Legend
First project was due yesterday at the bootcamp. Had to build a basic crud tic-tac-toe app.

Ended up helping a lot of people with theirs, figuring out how to build required features with various unique implementations of simple concepts really helped my understanding immensely.
did you build an AI for it? I actually just did that as an exercise for fun.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 06:21 PM
I didn't build an AI for it, because I had limited time, but I did read into some potential strategies for building one.

Going to keep improving the code and also try and add one. Seems like it would be pretty fun.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 07:31 PM
Quote:
Originally Posted by Larry Legend
I didn't build an AI for it, because I had limited time, but I did read into some potential strategies for building one.

Going to keep improving the code and also try and add one. Seems like it would be pretty fun.
i may clean up the code and start a thread about it, with the aim of golfing it, conceptually if not in strict lines, and using it as platform for exploring various js paradigms. would there be any interest in that?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2017 , 08:23 PM
I'd be interested in seeing that
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m