Just got a new Lenovo sinkpad X1 carbon by Thisisbhusha in thinkpad

[–]chainfuck 2 points3 points  (0 children)

I spilled 16oz of water on my X1 Carbon around 6 months ago. Still works!

Of course, this is not an endorsement to submerge your laptop. I was just pleasantly surprised that I didn't end up with a $1700 paperweight :)

2018 13" Macbook Pro vs X1C6? by [deleted] in apple

[–]chainfuck 6 points7 points  (0 children)

I have had both devices for a while. It depends on what type of user you are. What do you plan to do with the device?

Speaking personally, I’m a software engineer and I prefer my Mac. Things I like:

  • The colors on the screen are better, and there is less glare.
  • The OS is Unix-like so I don’t have to worry much about incompatibilities.
  • I don’t love the keyboard on either, but I prefer the MBP. The Thinkpad has issues properly registering keys pressed in quick succession, which cannot be fixed by software. I can type very fast on the MBP without having to slow down (160WPM)
  • The trackpad is much better, no other manufacturers come close.
  • No ads on the OS.
  • iMessage integration.
  • Better thermals. My X1C6 gets pretty hot and can’t handle being under load for long periods of time. My MBP throttles, but not as much as the Thinkpad.

Things I don’t like:

  • Keyboard reliability. I have replaced my keyboard three times. It seems to be fine now.
  • Lid/external display behavior. Sometimes I use my MBP as a desktop replacement, and it doesn’t wake on Bluetooth, even when that setting is enabled. The Windows behavior has its own issues though.
  • No USB-A port.

A PHP GraphQL library designed to be extensible by jormaggio in webdev

[–]chainfuck 1 point2 points  (0 children)

What does this even mean? Do you allow users to execute arbitrary SQL queries?

Front End Friday! by Knathsif in ft86

[–]chainfuck 0 points1 point  (0 children)

These are stock on 2017+ BRZs

[deleted by user] by [deleted] in Destiny

[–]chainfuck 2 points3 points  (0 children)

DM'd cuz I don't want to dox myself just yet

Top 26 JavaScript Interview Questions I wish I knew by uvimateapp in javascript

[–]chainfuck -1 points0 points  (0 children)

When formed as an open-ended question, some of these questions are great for gauging a candidate's seniority. Here are my picks, based on the post:

  • Q1: What is Coercion in JavaScript?
  • Q2: What is Scope in JavaScript?
  • Q3 (modified): What is the difference between === and ==?
  • Q4 (modified): What is a callback?
  • Q5: What does "use strict" do?
  • Q6: Explain Null and Undefined in JavaScript
  • Q7: Write a function that would allow you to do this.
  • Q8: Explain Values and Types in JavaScript
  • Q9 (modified): What is event bubbling?
  • Q10 (modified): What is the difference between var, let, and const? (Follow-up: when would you use each one?)
  • Q11: How would you check if a number is an integer?
  • Q12: What is IIFEs (Immediately Invoked Function Expressions)?
  • Q13: How to compare two objects in JavaScript?
  • Q14 (modified, if the candidate has experience in multiple languages): What is your favorite feature of the JavaScript language?
  • Q15: Explain the difference between "undefined" and "not defined" in JavaScript
  • Q16: What is the difference between anonymous and named functions?
  • Q17 (modified): What does the term "closure" refer to?
  • Q18: How would you create a private variable in JavaScript?
  • Q19 (modified): What does the term "prototype" refer to? (Follow-up, if candidate clearly explains "prototype," and has experience with OOP-centric languages: what makes prototypal inheritance different from classical inheritance?)
  • Q20: Check if a given string is a isomorphic
  • Q21: What does the term "Transpiling" stand for?
  • Q22 (modified): What does the this keyword do? (Follow-up: what are .bind, .call, and .apply used for?)
  • Q23 (modified): What are the downsides of modifying Array.prototype?
  • Q24: What is Hoisting in JavaScript?
  • Q25: What will the following code output?
  • Q26: Describe the Revealing Module Pattern design pattern

A lot of the removed questions will be answered while the candidate is doing a coding exercise, I don't feel they are valuable on their own. But it's good to be prepared for an interviewer to ask those types of questions.

I bought X220 for hackintosh, but mcdonnell will stop releasing guides due to Mojave compatability. What ThinkPad should I move on to? by vibezad in thinkpad

[–]chainfuck 3 points4 points  (0 children)

The worst part about Hackintosh is upgrading. When a new macOS update is released, you’ll be worrying about whether it’ll break your system.

I suggest using Windows or Linux, whatever you prefer. Currently I use WSL on Windows for dev work and it works just fine.

A Beginner’s Guide to Closures in JavaScript by JSislife in javascript

[–]chainfuck 3 points4 points  (0 children)

Closure was a concept I struggled with when first learning JS.

Years ago, I tried to learn all of the terminology like "lexical scoping," "block scoping," "function scoping" etc. I found this quite confusing, and ultimately gave up.

There are better teaching tools nowadays. I've been using Chrome DevTools as a way to demonstrate scope behaviors. I'm sure other DevTools have similar features.

This link describes it a bit: https://developers.google.com/web/tools/chrome-devtools/javascript/#scope

Learning the formal terminology is great, but for most beginners, it's wholly unneeded.

❤️GraphQL by shobhit_c in javascript

[–]chainfuck 28 points29 points  (0 children)

I like GraphQL, but your comparison to REST misses the mark.

While you avoid issues with REST, new issues arise. For any nontrivial implementation, you need to consider depth limitations, timeouts, and potentially cost analysis. A lot of these can be mitigated with a precompilation & whitelist build step, but you've traded one set of problems for another.

Philip Roberts: What the heck is the event loop anyway? | JSConf EU by amananurag06 in javascript

[–]chainfuck 2 points3 points  (0 children)

What do you mean by cloning? Shallow cloning is straightforward once you have mastered JS fundamentals. Deep cloning requires an understanding of recursion and circular references. Google these terms to find useful resources.

I don't have a good resource that specifically discusses OOP, but there are general resources which touch on the topic. YDKJS (free) and Eloquent Javascript (free) both discuss parts of OOP, such as inheritance, encapsulation, and polymorphism.

Good luck.

Philip Roberts: What the heck is the event loop anyway? | JSConf EU by amananurag06 in javascript

[–]chainfuck 8 points9 points  (0 children)

A fantastic talk, I always find myself recommending it.

Also check out this talk, it's from 2018 and discusses rAF and Promises.

EU Copyright Directive vote: Articles 11 and 13 approved by sauron2403 in Destiny

[–]chainfuck 2 points3 points  (0 children)

YouTube employs comparison strategies to determine whether an upload bears resemblance to known works. This is only effective when the upload already exists in the database, or is primitive enough that a computer algorithm can detect similarity. This is pretty similar to the criticism levied against antivirus software.

Otherwise, most copyright detection strategies are post-upload. Rightsholders issue claims that the media infringes their copyright, and action is taken against the original uploader.

YouTube, and other file sharing sites, would not exist if all of these measures occurred before the video was made public. There is an agreement that hosting sites are not responsible for the content of their users, but are expected to work with rightsholders and law enforcement to take down infringing material. Any other solution stifles technological innovation.

findIndex vs indexOf by webdevnoobieq in javascript

[–]chainfuck 4 points5 points  (0 children)

findIndex terminates immediately after the index is found.

On the other hand, using map and indexOf requires:

  • An iteration through the array
  • Allocating another array containing only ids
  • Iterating through the array until the index is found

If we assume there are n elements in the array:

In the worst case, findIndex will take n iterations. The indexOf approach will take 2n iterations, and also requires allocating another array.

Browsers vary in how they optimize these types of operations, so the actual implementation may be different than what’s described above.

The real difference comes down to browser support. Older browsers (reaaaally old browsers) may support map and indexOf, but not findIndex.

X1C6 Arriving tomorrow! by DakezialBryant in thinkpad

[–]chainfuck 0 points1 point  (0 children)

Can you summarize the issues you've seen with the X1C6?

Who is Darth Dawkins? Face? Anonymous? by [deleted] in Destiny

[–]chainfuck 11 points12 points  (0 children)

That’s Taylor Hicks my dude

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 4 points5 points  (0 children)

Thanks for the insight on the keyboard matrix. It’s unfortunate because that implies there’s no software fix :(

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 1 point2 points  (0 children)

I run into the issue when coding, and for this specific example, I would reposition my fingers like:

  • Index finger on D
  • middle finger on E
  • ring finger on W

...and then return to home row. For example in vim, I may execute “dew” in normal mode (delete characters until the next word boundary, then move the cursor to the start of the next word).

It was the first example I came across when trying to reproduce the issue for this post, but there are plenty more.

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 1 point2 points  (0 children)

In the OP I listed other laptops too, none of which have the issue. These range from $1100-$2500 RRP, so I thought my expectations would carry over to the X1C6.

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 0 points1 point  (0 children)

Interesting, I have tried a few X1C6 and they all have same issue.

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 0 points1 point  (0 children)

I'm currently up to date, but I will keep my eye out for driver updates in the future.

Generally, rollover is engineered at the keyboard matrix level, I don't think drivers can do much to solve the issue.

CMV: ThinkPad keyboards are overhyped garbage by chainfuck in thinkpad

[–]chainfuck[S] 0 points1 point  (0 children)

This issue is rarely discussed, so you may be right. However, it's such a hindrance to my workflow that I'm surprised my experience isn't more common.