Open Side Menu Go to the Top

04-14-2016 , 07:12 AM
Quote:
Originally Posted by Mavoor
okay thanks guys,

indeed inserting NULL into the id field generates a key. So right now I'm creating an object with id = 0, and then writing it into the database except that instead of writing the objects id I write NULL into the database. For the record this method assigns the maximum current id + 1, regardless of whether any smaller id's have been freed up. so it doesn't "reuse" id's

It feels improper to create an object with id = 0 and then immediately write it into the database with id as NULL. I'm only creating the object to be able to use it's parameters to build the sql query that saves it, it never actually gets used unless it's read from the database first. So I'm thinking I shouldn't create the object first, but rather just write what would be it's parameters immediately into the database.
Doesn't Java have Nullable<int>? You should be able to have an object with a null ID.

Disclaimer: Have not written a word of Java since 2001.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
04-14-2016 , 07:16 AM
Quote:
Originally Posted by coon74
My self-esteem is so low, e.g. I've just tried watching a video on how to create a login form in C# in Visual Studio and it looks easy, and it is indeed easy for most people, but I have a fear of something going fundamentally wrong and me having to spend hours to find an elusive bug.
It's going to happen so you need to just embrace it.

Like everything, you gradually get better. You'll create fewer bugs, but more importantly you will become exponentially better at solving the bugs with experience.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 07:20 AM
One of the big things they tried to impress upon us at jumpstart was to get over the fear/anger/disappointment that comes when you first try to run your code and there's inevitably errors.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 07:29 AM
I remember once on my birthday, I was working and wrote code all day, for like 6 hours, then finally I ran it to test it and everything just worked flawlessly. I kept trying to generate errors for like half an hour because I figured I was being trolled.

That was one time, aside from that everything I've ever written has had bugs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 07:54 AM
So you're saying I should take their advice and not get annoyed every single time things don't run flawlessly from the start?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:06 AM
Quote:
Originally Posted by blackize5
I bet you regret all those smashed mx revolutions now
The smashed 30" monitor in the middle of a $1k+ set of SNGs was much worse.

I still have 3 working MX Revolutions btw. Just broke the last one out of the box a few months ago. But the smooth scroll doesn't exactly work right (won't go superfast). So it's the backup mouse at work. I bought an MX master but haven't tried it yet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:11 AM
Quote:
Originally Posted by Noodle Wazlib
So you're saying I should take their advice and not get annoyed every single time things don't run flawlessly from the start?
I used to write a big program then run it and start debugging. But for many years now I basically start every project with hello world, then add one thing at a time, run, add another thing, run, etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:15 AM
I ended up with a G700s to replace my trusty MX Revolution. It's decent enough, certainly feels a bit cheaper though (it is half the price, to be fair).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:15 AM
The G700s has too few buttons to my taste; I used a G600 for a bit over a year until it started double-clicking and I didn't bother to have the microswitch repaired; instead, I switched to a Naga 2014, which lacks a third frontal button and is generally somewhat worse (most notoriously, its driver eats a ton of resources on startup).

Strangely enough, it seems to me that I'm closer to smashing my mouse during programming or related surfing than during poker play.

Bugs are really tilting. A cash hand or SnG ends and I quickly move on to the next one and forget about the ones finished. A bug stays and causes persistent frustration until I fix it.

Coding troubles are similar to what I've experienced in correspondence chess - surely, the latter is not for money, but if it were, it would be a blunt pain to be in a lost position and try desperately to salvage it for many days.

I know that I should comment code in more detail, encapsulate and test in smaller chunks, I was told that all back at uni, but there are also standard ways to improve my poker game too which I don't use nearly closely to their maximum potential.

Last edited by coon74; 04-14-2016 at 10:32 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:17 AM
Quote:
Originally Posted by ChrisV
Doesn't Java have Nullable<int>? You should be able to have an object with a null ID.

Disclaimer: Have not written a word of Java since 2001.
Apparently you can't give primitive types a null value, what you can do however is declare an object of their corresponding wrapper class (in my case Integer instead of int) and give that object a null value.

I can't recall that I've ever used wrapper classes before and now I'm wondering why primitives are preferred over wrappers?

As for my project I still haven't decided how I'll implement it, but I'm pretty sure I'll use a nullable Integer over an int set as 0. Most likely though I'll just try to write the data straight into the db without creating an object first, and then only creating an object when the data is read from the db
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:20 AM
Quote:
Originally Posted by _dave_
I ended up with a G700s to replace my trusty MX Revolution. It's decent enough, certainly feels a bit cheaper though (it is half the price, to be fair).
I'm on the mailing list for the Amazon review thread for the Performance MX (the MX Revolution's ****ty replacement). I still get emails occasionally from new people bitching about it. Why Logitech decided to downgrade their flagship product should be studied in business school.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:22 AM
man who makes decisions at logitech, so disappointed in their latest "premium" mouse, just felt bad and way too big. On my third Performance MX and its OK but obviously the revolution was so much better. I literally have to replace my AA battery every 10 days.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:29 AM
I guess they really wanted the small universal dongle to help leverage their mouse popularity with other devices. With the small dongle you can't have 2-way communication - so the smart scroll shift had to be replaced by manual shift - which sucks donkey ass.

Pure speculation obviously, but I wouldn't be surprised if they had to sell their stock growth story somehow and shoot for the moon, even if it meant potentially cannibalizing their premier product.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 10:31 AM
So Perf MX is a flagship mouse whose first ever failure happens because of battery discharge and before its microswitch wears out, really? Wow.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 04:35 PM
i'm loving the font on the new os x upgrade
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 04:40 PM
Quote:
Originally Posted by iversonian
i'm loving the font on the new os x upgrade
There is a lot I dislike about this sentence
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 09:07 PM
I like it but this is the font I really lurve http://www.typography.com/blog/introducing-operator/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 11:17 PM
I'm guessing a bunch of us are following the Cruise scandal.

Holy **** I cannot believe the incompetence on display between people who are supposed to be experts in this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-14-2016 , 11:27 PM
i'm interpreting that as a shat at YC?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2016 , 12:06 AM
SamA said it himself that when the guy left he didn't sign anything, and this all would have been avoided if he did.

He definitely knows he ****ed up really really bad here.

I don't see this ending well, you can't just dissolve someone without any paperwork, especially in CA.

The counter suit is so cringeworthy. The guy sent an email asking how much he was getting, and the offer went up to 1.5m before Sam called himself and offered 4.5m which imo looks really bad.

I don't doubt that this guy wasn't responsible for a lot (any) of the actual hands on work for Cruise, but not having him sign an exit is so ****ing terrible. Really absurdly dumb, kinda hard to believe how everyone is an imposter and making things up as they go.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2016 , 12:09 AM
Prediction:

This is going to go down as one of the biggest **** ups in Silicon Valley history and be a case study in exit clauses and due diligence.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2016 , 12:17 AM
Quote:
When Guillory told Altman he would not be able to meet that deadline because he needed to review the proposed terms of the agreement with legal counsel, Altman told Guillory he should fire his lawyer if he had already retained one, and offered to send him a list of lawyers to consult.
Yikes
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2016 , 01:29 AM
Link to cliffs?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-15-2016 , 08:33 AM
Quote:
Originally Posted by kerowo
I like it but this is the font I really lurve http://www.typography.com/blog/introducing-operator/
For those who want a free font instead, there's a big collection of monospace fonts at http://programmingfonts.org/

The latest addition to it is mononoki
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m