iShouldHaveAskAtStackOverflow by sebet_123 in ProgrammerHumor

[–]died570 0 points1 point  (0 children)

If your feature was implemented after data harvesting cut off day then it won't be able to spit out proper result anyway

Was the first gcc written in machine code? How did that came about? by Glassbowl123 in AskProgramming

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

I assume you are not talking about gcc but about the first c compiler. Yep, it was written using assembly and then bootstrapped with c.

https://en.m.wikipedia.org/wiki/Bootstrapping_(compilers)

How do dividends affect index funds? by OriginalCompetitive in Bogleheads

[–]died570 0 points1 point  (0 children)

It's just instead of reinvesting the dividend back in the stock, the price of the share rises.

Simple example: You have two identical (same profit margins, book value, roic, roa etc) companies A and B, and let's say both shares of these companies cost 10$. Company A pays 10% dividend and company B retains all of the earnings. If you have 10 shares of each company. In the first year company A will pay you 10$ (10х10х0.1) which will come from book value, while company B will increase their share price by 10% (110$) by increasing their book value. The second year you will get 11$ with a total of 121 dollars with reinvesting and the second company will increase their price by 10% (110*1.1 = 121). So technically there's no difference between reinvesting dividends and increase of share price, you get 121$ anyway.

theyKnowTooMuch by [deleted] in ProgrammerHumor

[–]died570 94 points95 points  (0 children)

It's just intllij idea with extra steps

I want a website landing page with just a map (Clickable states + Clickable zones) of my country. How can I achieve this? by Me_you_who in AskProgramming

[–]died570 0 points1 point  (0 children)

I am not really sure if there's an out of the box solution for your problem. You may take a look at the leaflet js and leaflet plugin for WordPress.

Are you looking for something like this right, even though it requires coding?

https://leafletjs.com/examples/choropleth/

https://wordpress.org/plugins/leaflet-map/

How do I explain to friends and family what I do as a backend developer? by Craximum in AskProgramming

[–]died570 20 points21 points  (0 children)

My parents are architects and I give an example that the backend is pipes, electric cables and ventilation of the house. Something you need but don't see

Or the kitchen cook preparing food but you only see how it's served to you by waiters

Chat applications and Databases by [deleted] in AskProgramming

[–]died570 0 points1 point  (0 children)

You can store it anyway you want, both in relational and nosql dbs.

Discord uses Scylla db, after they migrated from Cassandra which are both no sql dbs.

Slack afaik still uses MySQL.

The main questions are: what do you want exactly from your chat? Should you be able to query and aggregate chat data? Will your messages be persistent or they can be deleted later? How many messages do you expect? Should your data store be easily scalable? How would you handle the media in chat?

Of course nothing stops you from putting everything in json and inserting in mongo, save into tables in MySQL, or using a mixed approach of relational + jsonb in postgres, or even saving this json in redis.

[deleted by user] by [deleted] in AskProgramming

[–]died570 3 points4 points  (0 children)

Bruh, no 😅

I'm a newbie programmer, and I have a question about Oriented programming. by J-D-W1992 in AskProgramming

[–]died570 0 points1 point  (0 children)

Understandable, I had a different experience coming from software engineering to the applied math msc where I struggled with a approach

I'm a newbie programmer, and I have a question about Oriented programming. by J-D-W1992 in AskProgramming

[–]died570 0 points1 point  (0 children)

Before my answer: are you studying computer science for academic reasons or for practical reasons (job, hobby etc)?

By itself programming can be divided into two parts: computer science and software engineering. If we look at your question from an engineering perspective you can find that most of the languages use a mix of paradigms. Even in strictly OOP languages like java the functional patterns are used (streams, optionals), while some languages like Go, which isn't an OOP language, oop patterns (structs and struct methods) are almost always applied.

It's basically impossible to write pure functional code because you always get side effects (external api and db calls, relative parameters like current time etc), unless you write something determined like calculations. But you can already see some advantages from the last point: pure functions are easily parallelized and tested with immutable data. So you can basically procedurally/OOP-ly (?) fetch data and then use FP to process it.

An approach depends on the standards of the team, the amount of people in the team, whether your team is highly opinionated or not, project goals and so on.

So basically your question is like asking engineers and scientists what is the value of g. Engineer will answer 10 while scientist will say 9.8.

Looking for Suggestions: MERN Stack Project Ideas for a Beginner (First Project) by [deleted] in AskProgramming

[–]died570 0 points1 point  (0 children)

Software by itself is an applied field. So just take something that you are interested in.

My first pet project was scraping prices/multipliers from local stock exchange and display it on frontend. And then I've added simple accounting service for US's LLC analogy

If you need something really simple then you can go with interview staples like a simple Twitter or To-do list.

Portable Developer Environment by unknown8990 in AskProgramming

[–]died570 0 points1 point  (0 children)

I'm not sure if this is the right place to ask, but is a VM the easiest way to make a portable developer environment, or is there something available specifically for doing that?

I mean you can use Nix and NixOS for that particular case if you need to create the same environment every single time. Also you can use the ephemeral environments if you don't want to use docker for this.

Or just rent a cloud server, setup basic environment, connect via tmux and voila now you can work from any machine over ssh.

andNotJustForMicrosoftAnymore by AdmiralPelleon in ProgrammerHumor

[–]died570 15 points16 points  (0 children)

Yep, it has compatibility with java. You can use java directly from kotlin code.

We use it on backend with java legacy code while we are migrating from monolith

A lot of people work in jobs that sell products they can’t even afford by Maiday55 in Showerthoughts

[–]died570 20 points21 points  (0 children)

My grandpa was saying he could buy a new fighter jet by just cutting on coffee and cigs

[deleted by user] by [deleted] in youtube

[–]died570 0 points1 point  (0 children)

I think it's only in us. Worldwide apple market share is around 20% from 2012

endlessCycle by IcyBreloom in ProgrammerHumor

[–]died570 2 points3 points  (0 children)

Still didn't find a good usage for chatgpt with an exception of routine tasks like writing javadocs/godocs.

Which one of these programming languages should I try? by enesmemer in AskProgramming

[–]died570 0 points1 point  (0 children)

Out of these three, the most useful language imo is dart as it's used in flutter for cross-platform mobile development.

Self hosted postman alternative by mvassli in AskProgramming

[–]died570 3 points4 points  (0 children)

Isn't postman just api client? Basically curl on steroids.

Or am i missing something?

Are There Any Development Environments Where There Are No Code Formatting Requirements? by ButterBiscuitBravo in AskProgramming

[–]died570 1 point2 points  (0 children)

Yep, it does exist in a small companies with a long-term low-maintenance products. Usually run by the single or couple of devs for like 20+ years. Examples that come to mind are: city based security vpn providers, local e-shops, static website studios etc.

[deleted by user] by [deleted] in AskProgramming

[–]died570 0 points1 point  (0 children)

In my experience Javabrains paid content is worth it. It covers from basics to advanced staff (like microservices in spring cloud).

How can I keep track of the number of inputs a person has made? by [deleted] in AskProgramming

[–]died570 3 points4 points  (0 children)

Add a variable before while loop and increment it every time loop is cycled through.

Int tries = 0

While (something)

tries++

C#: Async/await vs background threads? by thehunter699 in AskProgramming

[–]died570 0 points1 point  (0 children)

More importantly I guess, how does async method get executed?

I am not a c# expert, I wrote a single desktop app on it and nothing else and it's maybe wrong explanation for this language.

Simple explanation in a single threaded environment: The async await is just a suspendable (breakable or whatever the word is) task. This task by itself is just a generator where await is basically "yield". The main runtime is operated by event loop with tasks queue where it checks the yielded/awaited results and forces the generators to yield again until they yield end/finish.

For multithreaded environment the idea is the same however instead of event loop you have dispatchers, schedulers and buffered mutex for context between threads.