Open Side Menu Go to the Top

10-05-2016 , 08:58 PM
Quote:
Originally Posted by candybar
Other than rolling your own crypto (or really any elaborate custom code that takes significant effort except for integrating mostly existing solutions) being bad, security is also really not something you should worry much about in the early days of a startup. With that said, getting good experience is probably more important than the result here.
Well 1) our entire platform is based around highly secure encrypted documents and files - so investors will definitely want to know if we have that down and 2) there are multiple actors involved in decrypting a document to the point that the end user can actually view it.
** 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 **
10-05-2016 , 09:00 PM
Quote:
Originally Posted by goofyballer
That was a real company? Weird. They (Azubu) used to sponsor a StarCraft 2 team and I forget the details but they seemed kinda shadowy and it was never clear where the money came from. Someone wrote a long post on TeamLiquid (SC2 news/community site) digging into them and coming up with a whole lot of weirdness, like, apparently they were supposed to be a German company but everything came up as Korean.

Anyway, that name was a blast from the past for me.
Yeah, my old boss went to work for them - then tried to poach a bunch of us. I guess he's going down with the ship and will turn out the lights at the end. He was so useless. Great if you wanted a boss to stay out of your hair. Not so great if you ever needed him to do his job.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 10:10 PM
For a moment I thought I was the only person that had a super idiot for a boss
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 10:13 PM
Everything got so much better when that guy left. He made all the other managers lazy because they didn't want to pick up his slack. It was a very bad dynamic.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 10:24 PM
There was a feature request in our task tracker today that I decided to do. It didn't take long to complete. Funny thing is it will take 100x the effort to get it merged into master that it took to complete the task. I mentioned to the person who created the task that if they want to see it on production they would have to badger[list of people] on a regular basis

Last edited by Craggoo; 10-05-2016 at 10:38 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 11:07 PM
That's how my company is with bugs. If I find a bug as a developer, the easiest way to get it fixed is to secretly tell someone on the business side about it - so they can go through our business owner, which will get it on the docket. If I try to go to the business owner, he just ignores me.

I pushed my own bug all the way through the process one time. I basically had to champion it every step of the way, follow up with people who just nodded then didn't do anything, and push it through everything. Never again. Pretty clear message: don't report bugs.

We had a dev who's really into zookeeper. I told him I'd do everything I could to help him with node, but he'd have to champion this thing through the system. He groaned. Needless to say 3 years later the zookeeper POC never went anywhere.

In my new role everyone is all hyped about microservices. But we still have this very old infrastructure/operation model where each dev team has it's own operations team, who has to learn new server technology (what is node/nginx/etc?). Then they have to build out dev, test and prod environments which can take a good year from start to finish. I keep telling them all this stuff about microservices is just talk unless we change our build-out infrastructure provisioning process. Blank stares. They don't care. The POC got funded. That's all that matters.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 11:19 PM
For a while now, my dummy manager has been talking about how we need to start enforcing some coding guidelines. This past week, I told him about git hooks then explained in normal talk what it could do for us (enforce his style guidelines). That was Friday. It's now after work Wednesday and no "go do it". It's like... there are so many things i've worked on that I've either stashed locally or stuck in a branch. I merged master into all of "my" branches a couple times a month. Maybe 1 of those actually has a chance of ever making it into master despite the fact they are a pretty big improvement over what is there right now. A simple analogy... imagine instead of 257 pages (or whatever your pagination is in this thread), it showed every post on a single page. I added pagination/search/error validation and various other goodies to those pages. None of that exists on production right now.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 11:32 PM
Yep. The only thing that could hurt your boss is if he lets you merge that and something goes wrong. Getting good code or important features not asked for by the business is often a herculean effort. After 5 years at my old role, I finally had enough clout that they wouldn't fight me too hard if I told them something had to be done a certain way. But it was a constant fight to do it right for many years.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2016 , 11:52 PM
Quote:
Originally Posted by suzzer99
Yep. The only thing that could hurt your boss is if he lets you merge that and something goes wrong. Getting good code or important features not asked for by the business is often a herculean effort. After 5 years at my old role, I finally had enough clout that they wouldn't fight me too hard if I told them something had to be done a certain way. But it was a constant fight to do it right for many years.
Imagine for a moment you're on the bottom of the totem pole. Do you think it helps to get someone who will be taken more seriously to champion new features? The irony is that I would have already built out these new features before I ask them to champion it. At that point, it basically just requires someone with more clout to badger someone with write privileges to master to merge it in.

Last edited by Craggoo; 10-05-2016 at 11:58 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 12:06 AM
Yes absolutely. Champion the hell out of them, then when they go live you own them. Once you own enough things you become very valuable just by your presence. Badger away.

Being "the node guy" at my company has brought me retention bonuses and now a job where I work at home full time and am basically on retainer until they need me. Which would be some people's dream but, along with the chaos of my second job, it's driving me to drink.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 12:26 AM
Quote:
Originally Posted by suzzer99
Yes absolutely. Champion the hell out of them, then when they go live you own them. Once you own enough things you become very valuable just by your presence. Badger away.

Being "the node guy" at my company has brought me retention bonuses and now a job where I work at home full time and am basically on retainer until they need me. Which would be some people's dream but, along with the chaos of my second job, it's driving me to drink.
Drinking + gaming == super win

Drinking + coding == massive amount of swearing
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 12:36 AM
Drinking + watching baseball + compulsively arguing politics.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 01:53 AM
Quote:
Originally Posted by RustyBrooks
I have kind of an interesting anecdote/thought about SQL that I just wrestled with most of the afternoon.

tl;dr - Your first impulse with SQL is probably wrong (but you should probably try it anyway)

...

So finally I decided to do something like this

1. do a bulk select from my outter tablethat gets me all the entries from the database where thing1 is from my big list.
2. do a bulk insert of any of these that aren't in my list
3. do #1 again (because I need to get the IDs of all the inserted rows)
4. do a bulk select from my inner table similar to #1
5. do a bulk insert of anything that's missing

This is from memory but that's the basic idea. The code is longer, it's somewhat harder to read and understand.

It's 100x faster, too.
1. Bulk insert ignore on outer table
2. Bulk select from outer
3. Bulk insert ignore on inner table
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 08:16 AM
Quote:
Originally Posted by RustyBrooks
I have kind of an interesting anecdote/thought about SQL that I just wrestled with most of the afternoon.

tl;dr - Your first impulse with SQL is probably wrong (but you should probably try it anyway)

I had 2 tables, something like
Code:
create table outer (
   outer_id integer primary key,
  thing varchar(100)
  unique index(thing)
)

create table inner (
  inner_id integer primary key,
  outer_id integer references outer(outer_id)
  thing2 varchar(100)
 unique index(outer_id, thing2)
)
So the basic idea is, you can only have 1 row for each "thing" in the outer table. Each row in the inner table references a row in the outter table, and you can have just one row per outer_id+thing2. It doesn't really matter what they are but think of it like may outter is a list of animals and inner is a list of body parts or something like that.

I have a bunch of pairs like
('thisthing1', 'thisthing2)
and I need to put them all into these 2 tables as is appropriate.

My first thought, which I assumed would suck (but which I did anyway because it might be good enough and it was easy) was, to step through each thing I wanted to insert and say

1. do I already have an entry in outer? If so, id = that entry, else, insert entry and get id from that
2. insert into inner using this id, ignoring/throwing away any duplicates

This sucked. So I tried changing it so that I replaced 2 with
2. do we already have this entry in inner? If so, skip, else insert

This really sucked, even worse.

So finally I decided to do something like this

1. do a bulk select from my outter tablethat gets me all the entries from the database where thing1 is from my big list.
2. do a bulk insert of any of these that aren't in my list
3. do #1 again (because I need to get the IDs of all the inserted rows)
4. do a bulk select from my inner table similar to #1
5. do a bulk insert of anything that's missing

This is from memory but that's the basic idea. The code is longer, it's somewhat harder to read and understand.

It's 100x faster, too.
I'd probably to an insert CTE for this.

Start by inserting (thing, thing2) into staging_table, remove the duplicate values from staging_table then:

Code:
with aa as
     (insert into outer (thing)
      select thing from staging_table
      where thing not in
      	    (select thing
	     from inner)
      returning (outer_id, thing))
insert into inner (inner_id, thing)
select aa.outer_id, st.thing2
from aa, staging_table st
where aa.thing = st.thing
and st.thing2 not in
    (select thing2
     from inner);
Totally not tested, of course, but that's the idea. If you don't have CTEs or the returning clause in whatever you are using, I'm sorry, that sucks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 08:46 AM
Actually, probably doesn't need to check if thing2 is already in inner. That value can be duplicated, right?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 10:03 AM
Quote:
Originally Posted by n00b590
1. Bulk insert ignore on outer table
2. Bulk select from outer
3. Bulk insert ignore on inner table
You're right, I will try this

Quote:
Originally Posted by daveT
I'd probably to an insert CTE for this.
This is a new thing to me - I'll look into it. I'm at the point now where further optimization is probably not going to be critical now, I can process the largest object in our system in something like .05s, and typically the part of the system that collects this data takes 3 or 4 seconds so further optimization won't actually be an improvement.

SQL hasn't been a serious part of my life for several years, both of these things (CTEs/returning, and ignore) are new to me since the last time this stuff actually mattered to me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2016 , 10:45 AM
Sure, and if what you did works, it works great and I would never diminish something that works.

Now that I think on it more, you could probably do something like this, which uses upsert:

Code:
with aa as
     (insert into outer (thing)
      select thing from staging_table
      on conflict (thing)
      do nothing
      returning (outer_id, thing))
insert into inner (outer_id, thing2)
select aa.outer_id, st.thing2
from aa, staging_table st
where aa.thing = st.thing
on conflict (outer_id, thing2)
do nothing;
Using CTEs and holding return values are super valuable. They are one of those things that takes some upfront work to understand and get a hang of, but pays off big time later on. Data integrity issues will cause the query to fail outright, so that sweeps aside many of those concerns. CTEs and returning values are basically temp tables, so you don't have to worry about managing those either (create, truncate, drop, is it still alive in another transaction, ugh...).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 02:16 PM
Quote:
Originally Posted by Wolfram
My contract specifies 1 salary review per year.
Quote:
Originally Posted by Wolfram
Yeah, that isn't applicable to my case. I was talking about scheduled contract-bound negotiations.
What is this contract you're speaking of? Almost all employment in the US is at-will.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 02:18 PM
I'm not in the US and I don't know what "at-will" means.

I have an employment contract (is that not the right word?) with my employer that specifies this among other things.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 02:45 PM
Quote:
Originally Posted by Wolfram
I have an employment contract (is that not the right word?) with my employer that specifies this among other things.
I think you're putting too much stock in arbitrary rules someone made up that are not actually binding on anyone. You're clearly not bound by this rule since you're free to leave at any time, correct? Your ex-manager promised to give you a second review, which means neither your manager, nor your company are bound by that rule either. So who cares about clauses in a contract that no one is obligated to follow?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 03:18 PM
Quote:
Originally Posted by candybar
I think you're putting too much stock in arbitrary rules someone made up that are not actually binding on anyone.
It's a legal contract. It is binding by law.

Quote:
You're clearly not bound by this rule since you're free to leave at any time, correct?
Incorrect. If I want to leave, I have to give 4 weeks notice as specified in the contract. If they want to fire me they have to give me 3 months notice, which increases to 6 months at some point. Both of these things are not arbitrary in any way, but can be negotiated.

Quote:
Your ex-manager promised to give you a second review, which means neither your manager, nor your company are bound by that rule either. So who cares about clauses in a contract that no one is obligated to follow?
My ex manager gave me an informal verbal promise, and then left. I don't have a way to prove that. I should have taken it up with my new manager but I let it slide cause I'm a pushover.

If my current manager would skip my yearly salary review then I could take that to my union and get legal action because I have written proof of that. They have never failed to schedule the review and its always resulted in a raise, so I have no complaint until this recent event.

Last edited by Wolfram; 10-07-2016 at 03:25 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 07:13 PM
Quote:
Originally Posted by Wolfram
Incorrect. If I want to leave, I have to give 4 weeks notice as specified in the contract.
What are the consequences of not giving notice? What are the consequences of giving notice, then not actually doing any real work over those 4 weeks? What are the consequences of giving them 4 weeks, then simply starting a new job earlier and not showing up for those 4 weeks?

Quote:
If my current manager would skip my yearly salary review then I could take that to my union and get legal action because I have written proof of that. They have never failed to schedule the review and its always resulted in a raise, so I have no complaint until this recent event.
What does a review even mean here from a legal perspective? Is there some kind of formal process where some neutral third party arbitrates over whether you're getting paid fairly? I can review everyone's salary every day as long as I have full discretion over the result of the review - that doesn't mean anything. I don't see anything that forces them to pay above market and I don't see anything that forces you accept a below market pay.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-07-2016 , 11:01 PM
Look who is playing Mr. Buzzkill like usual
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 12:23 AM
Quote:
Originally Posted by Wolfram
If my current manager would skip my yearly salary review then I could take that to my union and get legal action because I have written proof of that. They have never failed to schedule the review and its always resulted in a raise, so I have no complaint until this recent event.
Unless by review, you mean some kind of third-party arbitration, there's not a single decently-run company in the world where your salary doesn't get reviewed at least once every year. Most likely someone looks at it a lot more often, whether you know about it or not. It's not some entitlement you negotiated - it's a basic survival strategy for the business as it's impossible to retain quality employees otherwise.

And let's say it is a contractual right that you negotiated. How does it prevent you from negotiating outside of formal reviews? I don't have any contractual right to a review - does that mean I can never negotiate my salary? Since I don't have the right to any review, is my manager doing me a favor everytime he considers me for a raise or a promotion?

This does not mean you're not right to wait or whatever, but you have to have some idea of where the market is, where you stand and what your strategy is. If you have a better alternative and you know your current situation isn't the best possible one, you can negotiate much more aggressively. If you're paid above market or for whatever reason your current situation is the best you can get, you play by the rules of the organization, whether actual or unspoken. If you can't play the market, you have to play the politics. But in this case, it feels like you haven't done the legwork to find out where you stand and what your alternatives are, while confusing arbitrary internal rules set by your counterparty with the rules of the game.

I see people giving advice about negotiating and stuff but really the very first thing you need to understand is where you stand. Aggressive negotiating will put you in a bad spot if it's clear to the other party that you have nothing better to fall back on. At the same time, if you have a strong hand, you don't want to just sit back and let them dictate the terms.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 02:05 AM
Noob question: What's the quickest and easiest way (for someone with minimal javascript experience) to convert an old-fashioned synchronous website to an asynchronous, "real-time" one? Basically I just need to set up a WebSocket connection to send JSON data back and forth, with javascript client-side to handle updates? Is it easier to learn a framework like Angular or React, or just use jQuery and a templating engine (Mustache/Handlebars)? Should I keep the current server-side rendering and add the dynamic client-side updates on top, or switch everything to render client-side? The server code is written in Go if that matters. TIA.

Last edited by n00b590; 10-08-2016 at 02:15 AM.
** 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