Open Side Menu Go to the Top

10-08-2016 , 02:15 AM
Quote:
Originally Posted by Wolfram
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.
Ah I see. In the US most tech employment is at-will, so both employer or employee can terminate work for any reason at any time (typically 2 weeks notice).
** 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-08-2016 , 02:25 AM
Quote:
Originally Posted by n00b590
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.
Do you need websocket? Two way communication via WebSocket adds more complexity than might be necessary for your use case? Are you familiar with the CometD protocpol? It uses long polling (regular HTTP with persistent connections). The server can push stuff on the CometD channel and client listens. Client can then send back whatever it wants using regular http calls to a regular server endpoint. You only need JS (with Comet library) to keep the connection open, and can use plain AJAX (or whatever you want) to make http requests.

I think you're mixing two things that should be separate. 1) Converting server side rendering app to single page style app and 2) implement real time updates/server pushes. You should separate those two problems
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 02:28 AM
Quote:
Originally Posted by n00b590
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.
It sounds to me like you are misunderstanding what a webworker is. What you describe makes no mention of a connection between client and sever post page load. What you are hoping to achieve is something that is reminiscent of gmail where I can send an email on one device and see it show up on my desktop computer. You refer to jquery/angular/react/hb which, afaik are purely client side. They do not have take advantage of the webWorker interface defined here afaik.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 02:54 AM
Quote:
Originally Posted by muttiah
Do you need websocket? Two way communication via WebSocket adds more complexity than might be necessary for your use case? Are you familiar with the CometD protocpol? It uses long polling (regular HTTP with persistent connections). The server can push stuff on the CometD channel and client listens. Client can then send back whatever it wants using regular http calls to a regular server endpoint. You only need JS (with Comet library) to keep the connection open, and can use plain AJAX (or whatever you want) to make http requests.
Nope I haven't heard of CometD, I'll check it out thanks. I've looked into combining server-sent events with regular http requests, which sounds similar, but I thought it seemed more complicated than just doing WebSockets. Keep in mind I'm a noob and have never written an AJAX request, so the learning curve is probably similar either way?

Quote:
I think you're mixing two things that should be separate. 1) Converting server side rendering app to single page style app and 2) implement real time updates/server pushes. You should separate those two problems
I only care about #2 (the real-time server pushes). But in order to handle those updates from the server I need client-side javascript with rendering logic to update the DOM as needed, right? (I'm assuming pushing rendered html snippets over the WebSocket is a terrible idea?) So I thought it might make sense to move away from server-side rendering to avoid having duplicate rendering code on the server and in the browser.

Quote:
Originally Posted by Craggoo
It sounds to me like you are misunderstanding what a webworker is. What you describe makes no mention of a connection between client and sever post page load. What you are hoping to achieve is something that is reminiscent of gmail where I can send an email on one device and see it show up on my desktop computer. You refer to jquery/angular/react/hb which, afaik are purely client side. They do not have take advantage of the webWorker interface defined here afaik.
I think you misread.. I don't know what Web Workers are, but I'm talking about WebSockets (persistent two-way connection) to get real-time server updates.

Last edited by n00b590; 10-08-2016 at 03:21 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 03:28 AM
You certainly could go full client side rendering, but most of the use cases I can imagine for a web socket don't require it. You could render the template/initial data server side and then let the client render updates that come in through the web socket
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 03:43 AM
@noob590 : I did a bit more reading. It seems that the main difference between webWorkers and webSockets are webSockets can manipulate the DOM while webWorkers cannot. The server shouldn't be manipulating the DOM anyway which, given this difference, makes me think that webWorkers are vastly superior.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 03:52 AM
Quote:
Originally Posted by blackize5
You certainly could go full client side rendering, but most of the use cases I can imagine for a web socket don't require it. You could render the template/initial data server side and then let the client render updates that come in through the web socket
What are the downsides of full client-side rendering - slower initial page load and potential search engine visibility issues? Neither of those are an issue for me on this project, so seems like I might as well do it because less code is always nice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 04:28 AM
I have read about server vs client rendering but I am still confused. I think my big confusion is that initial loading vs when the page is already loaded.

My understanding:
Once the page has already been loaded.
-server side: click a button, the server sends you back an entirely new page.
-client side: click a button- the server either sends you back data or you just change state locally. Either way the browser takes that new state and changes the html based on that.


On initial page load:
-server-side: the server just sends you the html page in its final form.
-client side: the server sends you the html and javascript which may ask the server for more data.


Lets take twitter:
-On server side rendering when you go to twitter.com/user1 twitter would send the browser a fully formed html page of all of user1s tweets.
-On client side rendering, the server would first give you a blankish html page and the javascript. The javascript would request user 1's tweets. The browser would get the tweets as json. The client would then take the json and use it to create the html.

Now lets say everything has already been loaded. How do you ensure you are always getting user1's latest tweets? Under client side rendering this makes sense to me. The javascript either periodically ask the server for client'1s tweets, or you refresh the browser.
However what happens with server side rendering? Every time user1 posts a tweet, the server just creates a new html page?

There is a good chance I am completely wrong about the way it works.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 06:05 AM
Quote:
Originally Posted by candybar
What are the consequences of not giving notice?
A lawsuit.

Quote:
What are the consequences of giving notice, then not actually doing any real work over those 4 weeks?
This is hard for the employer to prove, so probably no legal consequences. It will get out and affect your reputation. The market here isn't that big.

Quote:
What are the consequences of giving them 4 weeks, then simply starting a new job earlier and not showing up for those 4 weeks?
A lawsuit.

I'm confused. Do you not know how a legal contract works? Do you really think that breaking a legal contract has zero consequences?

Quote:
What does a review even mean here from a legal perspective?
Again I must ask... do you not know what a contract is cause your questions indicate that you don't?

Last edited by Wolfram; 10-08-2016 at 06:15 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 07:55 AM
Quote:
Originally Posted by penguinpoker
Now lets say everything has already been loaded. How do you ensure you are always getting user1's latest tweets? Under client side rendering this makes sense to me. The javascript either periodically ask the server for client'1s tweets, or you refresh the browser.
However what happens with server side rendering? Every time user1 posts a tweet, the server just creates a new html page?
Server-side rendering doesn't necessarily mean you get an entirely new page on each update. See: http://openmymind.net/2012/5/30/Clie...ide-Rendering/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 11:54 AM
what is going on here? websockets are just a communication protocol, it doesn't "manipulate the dom". Look into create-react-app and socket.io for what you need but you'll have to figure out the go way of sending/receiving websockets yourself but IIRC it has something that is good.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 11:54 AM
Quote:
Originally Posted by blackize5
You certainly could go full client side rendering, but most of the use cases I can imagine for a web socket don't require it. You could render the template/initial data server side and then let the client render updates that come in through the web socket
+1. If you only care about showing some notification/count you can manipulate the DOM directly with pure JS. No need for fancy frameworks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 12:57 PM
Quote:
Originally Posted by Grue
what is going on here? websockets are just a communication protocol, it doesn't "manipulate the dom". Look into create-react-app and socket.io for what you need but you'll have to figure out the go way of sending/receiving websockets yourself but IIRC it has something that is good.
Yep, go has gorilla/websocket. I've used other gorilla packages and they've all been solid, so it should be good. Per muttiah, it sounds like react will be overkill at this point so I'll give it a shot with pure javascript first.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 01:00 PM
Wolfram,

You're getting a lot of spergy advice from people who don't really understand contract law. They just don't know better and are making assumptions that European employment is similar to US employment. This is a programming thread after all. Talk to your supervisor and ask to get this in writing, if not, go ahead and quit. Obviously follow your contract. The amount you'll spaz when you get a lawsuit dropped on you isn't worth it. Or even a mean e-mail insinuating you did something inappropriate.

But umm... Be sure that you can get a better job. Or that you wanna sit at home and freelance while pulling unemployment or whatever. It would probably suck to quit and then get a new job that paid even worse!

NB: If you are offered something like this in the future, try and send a followup e-mail that atleast alludes to this so you have some sort of written track record. Seems weird that they wouldn't have some record of this other than just a "Hey cool, we'll check it out in 6 months."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 01:54 PM
If its super simple like 1-3 things to change when a socket emit event happens yeah use vanilla or jquery but react itself is super simple - top down component based 1 way data binding. At the top level catch the emit, pass what the components need as "props" (data), it will auto update the view layer, done.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 02:15 PM
Quote:
Originally Posted by n00b590
What are the downsides of full client-side rendering - slower initial page load and potential search engine visibility issues? Neither of those are an issue for me on this project, so seems like I might as well do it because less code is always nice.
Yeah. Plus your site is still functional for users with no js. And I personally think that client side rendering is more complexity and I like to avoid that unless it provides a clear benefit.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 03:12 PM
Quote:
Originally Posted by Mihkel05
Wolfram,

You're getting a lot of spergy advice from people who don't really understand contract law. They just don't know better and are making assumptions that European employment is similar to US employment. This is a programming thread after all. Talk to your supervisor and ask to get this in writing, if not, go ahead and quit. Obviously follow your contract. The amount you'll spaz when you get a lawsuit dropped on you isn't worth it. Or even a mean e-mail insinuating you did something inappropriate.

But umm... Be sure that you can get a better job. Or that you wanna sit at home and freelance while pulling unemployment or whatever. It would probably suck to quit and then get a new job that paid even worse!

NB: If you are offered something like this in the future, try and send a followup e-mail that atleast alludes to this so you have some sort of written track record. Seems weird that they wouldn't have some record of this other than just a "Hey cool, we'll check it out in 6 months."
Yeah, I don't really know how the discussion spun into this. Someone asked a question about salary renegotiation and I think I misunderstood the context and just answered what my situation is. Then I thought I'd add this tidbit about my ex manager in a sort of bbv-way. That seems to have triggered some people, I dunno why

At no point have I thought about quitting because of this incident. I like my job, the people I work with and our tech. All the horror stories posted itt are completely foreign to me. I just blame it on myself for not being a better advocate for myself and following this up immediately. Basically, I pussied out and now I think too much time has gone by. I'll put it in the experience bank and try to do better for my next review, which is in 3 months.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 03:41 PM
I thought you were asking for help too FWIW.

But glad you have a job you like.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 09:39 PM
Quote:
Originally Posted by Wolfram
A lawsuit.
Does the contract specify what you would owe in this case? What's the approximate damage? Also, what do you think is the probability of a lawsuit in this case? For example, let's say last year, 10,000 people did this - how many of them would get sued? Also, don't forget that anyone can sue anyone else for anything.

Quote:
This is hard for the employer to prove, so probably no legal consequences. It will get out and affect your reputation. The market here isn't that big.
How is this any different than at-will employment? I gave more than 4 weeks notice for my last job.

Quote:
A lawsuit.
Why? You didn't break the contract. You gave them notice and you simply failed to show up to work for a few weeks. In your country, do people get sued for not showing up to work?

Quote:
I'm confused. Do you not know how a legal contract works? Do you really think that breaking a legal contract has zero consequences?
Generally speaking, breaking a legal contract has no consequences except for what is specifically provided for in the contract, the damage you incurred to the other party, or in most cases, whatever consideration they were providing you in return for you upholding your part of the contract. Even that's overstating things and borders on paranoia - generally consequences are limited to what can be enforced on their end - they may not return your deposit, they may close your account, they may leave nasty reviews, they may terminate your employment and put you on the black list, that kind of stuff.

Otherwise, none of us would be able to do anything - between all the random license agreements and employment contracts and all that crap that we're forced to agree to these days, it's highly unlikely that any of us is compliance with anything. I'm sure within the last few weeks, I've randomly agreed to some nonsense over the course of browsing something on the internet or buying something without reading and I'm probably not in compliance with every one of those. I think most of us who have worked for a while have violated employment agreements at some point and anyone who's been renting for a while can say the same thing about a lease.

I guess it's not impossible you live in a country where every time a contract is broken, there's a lawsuit but in that case I think you're in the wrong profession. In the US, approximately 0% of contract violations are resolved in court and we're supposed to be this super-litigious country. By far the most likely consequence of anyone violating some contract is nothing - even any kind of settlement where you pay anything is exceedingly unlikely unless we're talking about something unusually egregious and willful that has caused substantial material damage. It can't be any other way - we sign contracts all the time without reading the fine print.

Quote:
Again I must ask... do you not know what a contract is cause your questions indicate that you don't?
What are they obligated to do? As I said, I can review your salary every year - it doesn't cost me anything. Does your contract specify that your salary be reviewed in some kind of objective way that would ensure that they can't simply perfunctorily "review" your salary without doing anything that would give you a chance of a raise? Is there some neutral third party involved in setting your compensation?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-08-2016 , 09:54 PM
Quote:
Originally Posted by Wolfram
At no point have I thought about quitting because of this incident. I like my job, the people I work with and our tech.
In this case, I wouldn't really frame this as negotiation and it's generally a mistake to try to apply advice people give about negotiation to this situation - this is just about winning friends and influencing people. You have no real bargaining chips and don't have any hard decisions to make. If this was truly the case and if your company does have a good review system where people's comp is adjusted automatically, I wouldn't even worry too much about compensation - asking for an additional raise was probably a small mistake - and the best way to raise compensation would be just taking on more responsibilities and becoming more visible to upper management. I guess you could bluff (because they don't know that you're this happy) but this also doesn't work unless you are personally critical to their business. And unless you're completely unaware of the market out there, you're probably happy in part because you're not underpaid.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-09-2016 , 07:12 AM
While this trolling is an A+ piece of performance art, for those following at home: Wolfram would lose a large sum of money in a trivially easy to prove case. Potential causes of harm would be lost productivity and hiring costs which is then exacerbated by legal fees he'll have to pay for (both his and theirs... likely).

I've literally never seen anyone break a contract before since its a terrible reason and then gives future employers sufficient reason to release employees. (Most employment termination requires cause. Learning of your employee violated their previous employment contract is probably this.)

While there is a lot more to cover in that meandering piece of trolling, essentially basing advice on European employment and culture from experience with US employment is some mixture of funny, naive, stupid, and harmful.

Wolfram,

If you call in sick, do you have to get a doctor's note?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-09-2016 , 12:16 PM
Quote:
Originally Posted by Mihkel05
While this trolling is an A+ piece of performance art, for those following at home: Wolfram would lose a large sum of money in a trivially easy to prove case. Potential causes of harm would be lost productivity and hiring costs which is then exacerbated by legal fees he'll have to pay for (both his and theirs... likely).
Hiring costs are borne regardless of whether you gave notice and they can just not pay for you for the period where you didn't work, which accounts for lost productivity. Again, the point isn't that there is no damage but that the amounts are trivial and legal processes are costly and uncertain - this isn't a uniquely American phenomenon. If your employer is not in the business of suing people and making a positive return, they are almost certainly not operationally structured in a way where suing anyone for trivial costs would provide a positive return. It takes away from operational focus and adds tremendous legal risks. Furthermore, executives who would have to sign off on this have absolutely nothing to gain from this - if they lose or are exposed to additional risks, it's a huge embarrassment and a massive career risk. If they win, no one cares.

My understanding is that European courts are more friendly to employees than American courts and European companies are even more risk-averse than American companies. Thus I have a hard time believing that a violation of this magnitude would result in a lawsuit. If it's already a bad idea to violate the contract, they aren't even significantly altering the incentives. I've been on this side of the discussion and even though they were clearly violating the terms of their contract, we were still more afraid of them suing us than anything and it never occured to anyone in the room (including our lawyer) that we'd pursue legal options.

Quote:
I've literally never seen anyone break a contract before since its a terrible reason and then gives future employers sufficient reason to release employees. (Most employment termination requires cause. Learning of your employee violated their previous employment contract is probably this.)
How would you even know if someone else is in violation of their contract?

Quote:
While there is a lot more to cover in that meandering piece of trolling, essentially basing advice on European employment and culture from experience with US employment is some mixture of funny, naive, stupid, and harmful.
This doesn't have to much to do with employment law or contract law - you can win lawsuits in the US for minor violations of contracts or employment agreements. The reason why we rarely end up with lawsuits has to do with the asymmetry of risk as explained earlier. They have more or less the same contract and operational arrangements with tons of other people and everything will be scrutinized to see if it's legal. Their internal practices will be scrutinized for any possibility of a violation. If they win, they win a trivial amount against one person who's practically judgment-proof. If they lose or are found to be liable or in violation of some law, they open themselves to a much larger risk. There are also non-legal risks - what if the defendant has a really good sob story?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-09-2016 , 12:49 PM
I have no interest in engaging you in this absurd troll. You have literally zero clue what you are talking about and are just guessing. Understanding Taleb's problem of induction would be really beneficial to your thought process. You frequently go on these trollish derails trying to draw from irrelevant experience which leads to you saying things that are either comical, pedantic, or both.

For example, you keep mentioning the US, which makes no sense. I guess you have never read an employment contract/hired/been hired in a European country, nor are familiar with the concept of employment contracts (see all your crazy posts). Again, I can't stress how silly you are. I just hope no one actually takes what you're posting seriously on this subject.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-09-2016 , 01:16 PM
Quote:
Originally Posted by Mihkel05
I have no interest in engaging you in this absurd troll. You have literally zero clue what you are talking about and are just guessing. Understanding Taleb's problem of induction would be really beneficial to your thought process. You frequently go on these trollish derails trying to draw from irrelevant experience which leads to you saying things that are either comical, pedantic, or both.

For example, you keep mentioning the US, which makes no sense. I guess you have never read an employment contract/hired/been hired in a European country, nor are familiar with the concept of employment contracts (see all your crazy posts). Again, I can't stress how silly you are. I just hope no one actually takes what you're posting seriously on this subject.
There's this thing called common sense. So your stance is that employers in Europe typically respond to minor violations of employment contracts with lawsuits. It's like a claim that truancy in some school district somewhere is routinely punished with beheading. It's not logically impossible but pretty hard to believe and I don't have to be a student in that school district to dispute that claim. I did some cursory research and I think you guys are even further off the mark than I initially thought:

From this:

http://www.howtogermany.com/pages/te...-contract.html

Quote:
The employer can respond to an employee's breach of contractual duties with a conduct-related dismissal. Generally speaking, this requires a breach of duty on the part of the employee. The German law requires that an employee receive at least one prior warning.
Apparently in Germany, it's not even easy to fire employees who are in violation of their contract.

From this:

https://www.toytowngermany.com/forum...ermany/?page=3

Quote:
Your husband's contract may stipulate some monetary penalty (such as a month's salary) for not complying with the notice period, but that will be the extent of what the company can do to you (aside from not giving him a shining letter of recommendation). It's not like he's facing jail time or anything, so don't worry about that too much.
Quote:
You can quit without the proper notice but you should check your contract if there is a clause in there about that. My current contract states that if I quit without notice, it will cost me a months wage.
Quote:
Before you start panicking, the notice period clauses are usually put in to protect the employee.
Most companies are ok with you to leave sooner, they don't want disgruntled employees hanging about.

So I suggest you simply ask them if they can do a Freistellung.
So pretty much exactly like I said earlier - penalties are typically stipulated in the contracts and contracts aren't meant to be enforced literally.

Since you talk about this as though you can't possibly know anything that you haven't experienced - have you been sued by an employer before or do you know anyone who has? I'm not really sure how signing a bunch of contracts gives you insight into the likely enforcement mechanisms if you haven't seen those in action.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-09-2016 , 02:21 PM
Are you really googling forum posts to bolster your case here on a subject you literally knew nothing about when you engaged in it?

Speaking of common sense, I am smarter than you are and have expertise in the matter. Someone who has some semblance of common sense would stop trolling and read what someone more knowledgeable wrote. A troll would dig in a google forum posts to bolster their (nonexistent) case.

You final paragraph is an obvious strawman. I have never once stated anything along those lines. I previously described how you struggle immensely with induction and its limitations frequently drawing false equivalence and then digging in when the obvious flaws in your thinking are pointed out. This is a great example of that. You can't even find ****ing legal guidance for foreign employers. If you're gonna troll, atleast give a half assed effort. I think many people would be able to understand the subject, including the person who is in the specific jurisdiction being discussed (Wolfram).
** 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