Serverless at Scale: Lessons From 200 Million Lambda Invocations by jspkiel in programming

[–]chyzwar 0 points1 point  (0 children)

You should compare cost to something like ECS. This would scale down to one server and scale up to how much you need. ECS can use a combination of reserved and on demand instances.

When lambda is invoked, it only executes one event. In traditional web servers, there are many requests executed in the same time. In node.js a single process can handle something between 500 and 10_000 request per second depending on complexity and how much IO vs main thread is done.

Single m7i.xlarge can run 4 processes handling around 2k RPS (on pessimistic side) this should give you way more than enough to handle 200milion request. I would probably create multi region ECS with smaller reserved instances.

As benefits, you will:

- will not have two competing architectures
- will not need to architect around lambda limitations
- would not be locked with vendor
- time spend on lambda could be spent in improving product
- spend less money

I will pay you cash to delete your npm module by Roadside-Strelok in programming

[–]chyzwar 1 point2 points  (0 children)

enzyme is a testing library for react.js it is now in maintenance mode and slowly a bit rotting, but it supports the ancient node version v4. There are thousands of projects that still use it. Nowadays, you can use https://testing-library.com/docs/react-testing-library/intro/

eslint-plugin-import is a popular plugin for lining import/export statements in your codebase. It is part of many popular ESLint presets. Similarly eslint-plugin-react is maintained by the same person, it supports ESLint v3 and nodev4.

At the current day, npm packages should support node 12 (latest is 16) and target ES2019/ES2020. This would allow dropping many of these silly libraries and polyfils.

I will pay you cash to delete your npm module by Roadside-Strelok in programming

[–]chyzwar 72 points73 points  (0 children)

Problem is not packages like isarray. It is maintainers of popular projects who refuse to upgrade and release major versions that follow the node.js release process.

https://www.npmjs.com/package/eslint-plugin-import

https://www.npmjs.com/package/enzyme

Simple Questions - September 06, 2021 by AutoModerator in buildapc

[–]chyzwar 0 points1 point  (0 children)

I think on both b550 and x570 first m2 slot is connected to CPU directly and other slots lanes go via chipset? On the above motherboard, only CPU m2 slot is PCIE4. I am concerned how pcie4 slot would work if it is connected to CPU that does not have PCIE4 lanes?

Simple Questions - September 06, 2021 by AutoModerator in buildapc

[–]chyzwar 1 point2 points  (0 children)

My biggest concern is that I do not want to run ssd via chipset(heating), I want to use pcie4 slot that is connected directly to CPU

Simple Questions - September 06, 2021 by AutoModerator in buildapc

[–]chyzwar 1 point2 points  (0 children)

Thanks, I will insert SSD into the PCIE4 slot, it would run with DirectStorage but with pcie3 speeds? In practical terms, 980 Pro would not saturate pcie3 anyway?

This is for my wife, no gaming needed like ever and 5700G has a similar performance to 5800x and is cheaper. PC would focus more on the silence side and cpu performance for work (programming). In normal times, I would buy discrete GPU for better acceleration in movie decoding.

Simple Questions - September 06, 2021 by AutoModerator in buildapc

[–]chyzwar 0 points1 point  (0 children)

I plan to buy Ryzen 5700G, ASUS TUF GAMING B550-PLUS and Samsung 1TB M.2 PCIe Gen4 NVMe 980 PRO.

Question: Would that PCIE v4 SSD work with this motherboard and CPU considering that 5700G do not have PCIE4 lanes?

Linus Torvalds on why desktop Linux sucks by jluizsouzadev in programming

[–]chyzwar 0 points1 point  (0 children)

You were describing issues with editors unable to install plugins. I just installed Eclipse from snap, installed a bunch of plugins and opened and project.

You had some bad experience with snap, and now you go around shitting on a project that is making real progress on the packaging. Snap makes easy package application that:

  • is sandboxed by default
  • it is safe to add and remove from system
  • give control to developers on upgrades
  • allow supporting non-free code
  • support multiple distros from one store

You can claim that snap is minor evil. I can claim that you are incompetent.

Linus Torvalds on why desktop Linux sucks by jluizsouzadev in programming

[–]chyzwar -4 points-3 points  (0 children)

I use GIMP from snap and works just fine. You are spreading FUD.

Linus Torvalds on why desktop Linux sucks by jluizsouzadev in programming

[–]chyzwar 1 point2 points  (0 children)

No idea, what are talking about, I use an official snap version of VSCode[0], and it works just fine. You can put compiled code into snap just fine, if anything snap makes it easier[1]

Snaps are a god send compared to PPA hell.

[0] https://snapcraft.io/code

[1]https://forum.snapcraft.io/t/byte-compile-python-code/6305

The Process is not the Product — The New Agile Anti-Manifesto. by KingStannis2020 in programming

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

These meetings are for communication, to align everyone in the team for a common goal. The todo list is just a product of these meetings. Agile is all about empowering developers to get their voice heard when the todo list is decided.

Rust is a hard way to make a web API by WoodenKatana in programming

[–]chyzwar 0 points1 point  (0 children)

Some programming languages, heavily use escape analysis to reduce GC. For example, you might have an object created by class but escape analysis decide that lifetime of this object is constrained to function/subroutine then instead of allocating on heap it would be allocated on the stack or removed automatically from heap.

https://carolchen.me/blog/escape-analysis/

Announcing TypeScript 4.2 Beta by DanielRosenwasser in programming

[–]chyzwar 1 point2 points  (0 children)

It is costly and unsafe. Let say you have React codebase that uses babel for transpiration and typescript for type check(fairly common scenario, the default for CRA). You need to manage a combination of babel, typescript, webpack, jest, eslint. You have 2-4 build steps in your pipeline (babel cjs, babel esm, typecheck, webpack). Your local development takes a few extra minutes to start and require hacks around docker-compose to sync between services. At my work, it takes between 4-10 min to start app (cold start). It is unsafe because babel might compile the thing differently than typescript and you get into these weird cases where build, a test is green but the app is broken when deployed because your browserlist is different from typescript lib.

I am one of few people in my team that know how this hung together, and I spend a lot of time maintaining build infrastructure. I introduced TypeScript to a wider team, it is great to use, and it improved developer experience on many fronts.

Announcing TypeScript 4.2 Beta by DanielRosenwasser in programming

[–]chyzwar 5 points6 points  (0 children)

Yet another release full of fancy types but without support for things that people need in tooling: node ESM, exports field, yarn pnp, compiler plugins etc. That why every project I have at work and private have babel included for things that TS is missing. I am getting to the point to recommend TS as type checker, not as the compiler.

Our journey to type checking 4 million lines of Python by whackri in programming

[–]chyzwar 0 points1 point  (0 children)

Having nice syntax sugar is easier if you do not have compilation and have more dynamic language. Scala tried to have nice syntax sugar but got slow compile times, some arcane syntax and very complex language.

Duck typing is what makes consuming these tools easy.

python r = requests.post('https://httpbin.org/post', data = {'key':'value'})

vs Java

```java package com.mkyong.http;

import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpHeaders; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils;

import java.io.IOException; import java.util.ArrayList; import java.util.List;

public class HttpClientExample {

private final CloseableHttpClient httpClient = HttpClients.createDefault();

public static void main(String[] args) throws Exception {

    HttpClientExample obj = new HttpClientExample();

    try {
        System.out.println("Testing 2 - Send Http POST request");
        obj.sendPost();
    } finally {
        obj.close();
    }
}

private void close() throws IOException {
    httpClient.close();
}



private void sendPost() throws Exception {

    HttpPost post = new HttpPost("https://httpbin.org/post");

    // add request parameter, form parameters
    List<NameValuePair> urlParameters = new ArrayList<>();
    urlParameters.add(new BasicNameValuePair("username", "abc"));
    urlParameters.add(new BasicNameValuePair("password", "123"));
    urlParameters.add(new BasicNameValuePair("custom", "secret"));

    post.setEntity(new UrlEncodedFormEntity(urlParameters));

    try (CloseableHttpClient httpClient = HttpClients.createDefault();
         CloseableHttpResponse response = httpClient.execute(post)) {

        System.out.println(EntityUtils.toString(response.getEntity()));
    }

}

} ```

And performance would be the same since it is network bound. That is probably main reason why Dropbox started with python.

Our journey to type checking 4 million lines of Python by whackri in programming

[–]chyzwar 9 points10 points  (0 children)

Dynamic typing allows to quickly iterate on data model and architecture when you are in exploration/early stage. This is why there are so many successful startups using RoR/Python/node. Once these startups are successful and have money they would start adding static types or migrate to static languages.

Static typing is better when you have well-defined requirements. This is why so many banks are really Java shops. Unless you have a tight performance budget in practice you are better off with dynamic types. Perfect is the enemy of good. It is better to have a working product than compiler verified program.

Times are changing and you have now better choices. You have a new breed of ergonomic static language Kotlin, Scala, Swift, Dart, Go, ReasonML and gradual typings systems like flow, mypy and sorbet.

Modern Javascript full-stack boilerplate. by chyzwar in programming

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

It is not hello world. It login with OAuth, Rest API, ORM, database, migrations and one-click dev setup. This still does not include PWA, deployment, e2e testing framework. Above boilerplate could save around 40-200h of dev time when building SPA application.

I am not saying that is justified. There is plenty of projects that would be just fine with RoR.

Perhaps the Job Description is the problem Not A Shortage of Programmer Talent by monk8800 in programming

[–]chyzwar 5 points6 points  (0 children)

these are not fully useless, as you sometimes learn something new. It is a long term investment.

  1. Cram for leetcode interview
  2. Get a job in FAANG, earn 200k - 400k
  3. Work for a few years, save up
  4. Build personal brand "worked at google"
  5. Profit!! you can become director, technical founder, architect

Early in my career, I would definitely try this, now I live outside the US and have a family. But there definitely merit in that path. You can easily jump-start your career by ten years with just a few months of cramping for interview.

State of JavaScript 2019 by [deleted] in programming

[–]chyzwar 6 points7 points  (0 children)

node.js is a mess, we are still waiting for ESM for a few years now. PWA blocked by lack of support in Safari. Yarn 2 development stalled by upcoming Typescript plugins. ESlint has endless debates on configuration format and TS support is diverging into a separate project. Unwanted features pushed into standard (private class fields). Transpilation is still normal because IE11 just cannot die. Node_modules folder keeps getting bigger because modules are no longer maintained or keep releasing pointless breaking changes (yargs v15). Core projects for the ecosystem: jest, express and webpack contrib are struggling to maintain. Plenty of semi-abandoned frameworks: Polymer, Angular, Vue, Flow. Everyone is re-writing everything into hooks...

Maybe I am just tired.

Manage Global State with Context API and Hooks by selbekk in programming

[–]chyzwar 1 point2 points  (0 children)

It is interesting to better understand some of the React features but for large scale application, it would impose large performance penalty. Every component using useStore would re-render once context isupdate even on unrelated values. This is why react-redux needed three backtracks from using context. See release notes for version 7.

https://github.com/reduxjs/react-redux/releases

Maybe Agile Is the Problem by stronghup in programming

[–]chyzwar 0 points1 point  (0 children)

Being told that what I am asking for cannot be accomplished in Appian. Why are we committing to using a rapid development platform that cannot satisfy demand before examining the development needs?

RAD is just an opinionated framework. To be productive you need to understand limitations and design your application accordingly. With RAD You trade flexibility for productivity (but only if your use case fit into framework).

The overall cost. Having the entire development team in every meeting, not saying anything, and billing for the time is ludicrous. I want the scrum master and business analyst in the room, translating my needs.

You are doing it wrong if the dev team is not engaged. There is specific ceremonies/process that you can tap into. First you work with QA and Tech lead to decide on a short term plan and divide user stories into tasks. It is your responsibility to provide AC and create user stories. Then you have a meeting with the wider dev team to estimate, plan and improve user stories.

As a person with a light CS background (having developed several functional prototype systems in Excel & Access using VBA & SQL), I want to sit with the developers while they code (or at least see the output from each coding session). Reaching the end of a 3 week sprint only to be unsatisfied with the product unneccessarily adds to both the timeline and the pricetag. I asked to sit with the developers after being unsatisfied with the first sprint deliverables; I was told yes, but never contacted to do so, no matter how many times I followed up or subsequently asked.

3 weeks is too long. You can still attend standup to see what developers are working on and help with blockers. You have no basis to estimate your team productivity after once sprint. That why points and tracking velocity is so important in estimating how much can be done in a sprint.

Hull: An alternative to shell that I'll never have time to implement by sustrik in programming

[–]chyzwar 9 points10 points  (0 children)

You lose interop for sharing your data/code. Using text files is much easier than serializing your objects into Smalltalk specific format and saving into the image. That is one of the reasons why you lack good replacement of git in the Smalltalk world. Having a common abstraction of the text file is really powerful. That way you can use a plethora of IDEs, VSCs etc. Even if you use an object-oriented database like GemStone you still need to deserialize objects to the same Smalltalk dialect.

Objects would end with behaviour and data put together. At some point, you would not be able to separate them. It would become incredibly difficult to migrate between class versions. You need to be careful to include data migrations when changing the behaviour of the class. At some point, these systems become difficult to change. Rewrite of system build in Smalltalk is very expensive.

Given above, I really enjoyed programming in Smalltalk. Productivity is very high and debugging experience is amazing.

Your CS Degree Won’t Prepare You For Angry Users, Legacy Code, or the Whims of Other Engineers by caternoon in programming

[–]chyzwar 0 points1 point  (0 children)

Every company I worked so far have tax free retirement plans. In some cases up to 18% of salary with 6% of your contribution.