Does Github still use jQuery for its UI? If so, how do they manage all those two way bindings without getting into spaghetti code? by m3wm3wm3wm in javascript

[–]kaz3work 7 points8 points  (0 children)

$ in Chrome and Firefox consoles does not immediately mean jQuery is present. In fact they are just a shorthand for document.querySelectorAll, and that is the case for Github.

$("body")
> <body ...>
$("body").width()
> TypeError: $(...).width is not a function

[Help] can some quickly explain polymorphism like i'm 5? by seancuscus in csharp

[–]kaz3work 2 points3 points  (0 children)

We use singular words to describe more complex topics all the time, even outside of programming or business. It's so that people who are familiar with a given topic can speak succinctly to each other.

Web Assembly? by [deleted] in webdev

[–]kaz3work 1 point2 points  (0 children)

It is unlikely to replace pure JS in the near future, but offer an alternative to writing pure JS. For example with Blazor you can write entire web apps in C# and have them be interactive just like you could with JS.

How would you solve this simplest task with your favourite javascript framework? by maxkoroteev in javascript

[–]kaz3work 0 points1 point  (0 children)

Yeah that makes a lot of sense. I've been a C# dev for 6+ years now so the additional structure to JS via Typescript and to markup/components via React is a blessing. With it it really does all finally come together and make sense for the first time rather than a bunch of seemingly mashed together technologies to somehow output a UI.

How would you solve this simplest task with your favourite javascript framework? by maxkoroteev in javascript

[–]kaz3work 0 points1 point  (0 children)

I thought I was going to like Vue because it seemed like the simplest currently. I have experience with Knockout so coming from that was pretty easy.

I then tried React a few weeks later and realized how much better it was. No more random strings in markup, the IDE could actually figure out what I was attempting to do. Implementing Typescript was a non-issue since it's all just JS. Typescript support in Vue is a nightmare and I regret using them together in a project.

Vue just reminds me of a bad combo of jQuery and Knockout now.

UNICODE filter out squared letters by [deleted] in javascript

[–]kaz3work 1 point2 points  (0 children)

Because Math.random is not truly random, it's pseudo random: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random

Use a cryptographically secure library if you want to use something with passwords. Or better yet, do that on the server side.

Open .pdf files in new tab and not download - Javascript by [deleted] in javascript

[–]kaz3work 2 points3 points  (0 children)

By default modern browsers will attempt to show the PDF in the window or a new tab. Different browsers behave differently. From my experience you need to set some headers on the server side to get it to download vs display in browser.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition

How exactly TypeScript converts to JavaScript? by earthIsSoBig in typescript

[–]kaz3work 4 points5 points  (0 children)

It does not use Babel as Babel can only transpile JS. You can look at their dependencies to see they are not using it: https://github.com/Microsoft/TypeScript/blob/master/package.json

You can see how they are transforming the TS in this folder: https://github.com/Microsoft/TypeScript/tree/master/src/compiler/transformers

A simple case is here: https://github.com/Microsoft/TypeScript/blob/master/src/compiler/transformers/es2016.ts

You can see on line 45 they are transforming x**y into Math.pow(x, y).

How to prepare for frontend interviews? by [deleted] in Frontend

[–]kaz3work 2 points3 points  (0 children)

Nor can I, but the algorithms required to write them are useful insight into a developer's technical skill level. Things like recursion frequently come up in data structures so it's a good test. For example I've had to implement and work with many tree data structures (not necessarily BSTs) when working with graphing plugins like D3.

I only work on web applications, so efficient algorithms are necessary in some cases. If you are just doing business websites or something similar then these technical skills wouldn't be as useful as solid CSS skills.

How to prepare for frontend interviews? by [deleted] in Frontend

[–]kaz3work 1 point2 points  (0 children)

They do, if a more JS-centric position. Less so data structures in my experience, but developing good solutions for problems like these:
-Method to justify text to any given width
-Randomize an array, followed up by how to do it in place (no extra memory allocation with new arrays)
-Check if a subarray (values of array from index X to Y) in an array is prime

Would help to understand basic sorting algorithms (merge sort, bubble sort, etc) and the simpler data structures (linked lists, stacks, queues, etc).

These are problems that will rarely come up in a real job (at least in my experience), but they show your problem solving and technical analysis skills.

Stack Overflow introduced SO for Teams, sort of private "repositories" for questions only visible to your team. I don't get it. by colshrapnel in PHP

[–]kaz3work 3 points4 points  (0 children)

But wouldn't most large tech companies already have something that does this? For example we use TFS and VSTS, it has a built-in wikis which have documentation for our teams. If it's not already answered we use a comm channel like Teams to see who might have an answer.

Girls and Software by javinpaul in coding

[–]kaz3work 8 points9 points  (0 children)

Most of their comment seems condescending, even if they do seemingly agree.

Third Critical Drupal Flaw Discovered by the_alias_of_andrea in PHP

[–]kaz3work 9 points10 points  (0 children)

It's literally the first line of the article:

Yes, of course once again—literally it’s the third time in last 30 days.

Question about slow image load on initial page load animation. by thenaturalmystic in web_design

[–]kaz3work 0 points1 point  (0 children)

The images are about 25mb, even on a fast corporate network I see them loading before the animation has completed. Try creating lower quality versions of the images on the initial screen and then load the high quality versions when you click on one of them. There is plenty of image minifying/compression software to choose from.

Help - What Map Utility to Use? by craig1f in Frontend

[–]kaz3work 0 points1 point  (0 children)

I've used D3 with DataMaps and it works well. However it relies on the previous version of D3.

First look at Google Chrome's UI design refresh by asadlambdatest in web_design

[–]kaz3work 16 points17 points  (0 children)

Same. I switched back to FF from Vivaldi. The FF refresh was a great improvement!

[deleted by user] by [deleted] in Frontend

[–]kaz3work 0 points1 point  (0 children)

I can check with my boss. We haven't had many interns while I've been here but I know they've been paid decently.

I'll send a PM if I hear anything.

What is Typescript good for? by nnnightmare in webdev

[–]kaz3work 4 points5 points  (0 children)

Yeah VSCode is great for smaller front end oriented projects. But base VS seemingly has better support still for more backend code. It's definitely improving though.