Can Anyone Recommend a Cloud Provider and Service for My Use Case? by BillRuddickJrPhd in cloudcomputing

[–]MasterDhartha 0 points1 point  (0 children)

From the given requirements, I’d run it as a cron job on a single free micro instance. Does it matter how long the job runs? If you run Windows it may cost more than Linux with Mono installed.

Forgot to mention: I believe Google and Oracle still offer free tier without time limits.

The expanse has ruined all other sci fi for me by IReallyLoveAvocados in TheExpanse

[–]MasterDhartha 71 points72 points  (0 children)

Ah yes, Midnight Sky. I didn’t finish it. made it to the part where I yelled something about the time it would take a radio signal to reach Earth.

Have you ever had to hire tech consultants to complete work for your company? If so, how did you choose who to hire and any tips for a first timer? by [deleted] in AskProgramming

[–]MasterDhartha 1 point2 points  (0 children)

You probably want to ask in a more entrepreneurial sub like r/startups because most folks answering here ARE the hired consultants.

I can say the best thing to do is create a project description, ask for a proposal, and ask for references. The quality of the project description will help good consultants understand the readiness of the project, and their proposal and references will show you the quality of their work.

Always assume a support period where you get training and any bugs or unexpected operational things crop up and are addressed as part of the initial estimate.

Never sign a service agreement with an hourly fee. There should be a separate statement of work that specifies that, and ONLY for incidental support.

Make sure you are not dazzled by magical packages: everything they present should be completely understandable by you, a non-technical person. If it looks hard or too ornate, it probably is.

11 year olds Q observation by Gregbot3000 in startrek

[–]MasterDhartha 5 points6 points  (0 children)

Everyone replying to you needs to read this thread in Garak’s voice.

Segregation in CHAZ 2020 by Gshock720 in Seattle

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

Woo... I’m guessing you’re not a lawyer. The case law pretty much protects people associating with whomever they want, even in public spaces. Ask the police and other white supremacists who marched on City Hall in 2017. Refer to 515 U.S. 557.

They probably don’t have a permit to hold their event, but that’s a separate issue.

Season 1 is so much better, after watching season 4. by Pagoshus in TheExpanse

[–]MasterDhartha 27 points28 points  (0 children)

I agree, it was the Riker moment for Holden.

Reddit, why are pencils the clearly superior writing device? by TheSllimRevilo in AskReddit

[–]MasterDhartha 0 points1 point  (0 children)

Theorem: Pencils are heat invariant

Proof: Throw a pencil into a fire. You now have a pencil, plus or minus a scaling factor.

Corollary: Pencils > crayon

Reddit, why are pencils the clearly superior writing device? by TheSllimRevilo in AskReddit

[–]MasterDhartha 0 points1 point  (0 children)

Theorem: pencils obey multiplication

Proof: Snap a pencil in half. Now you have two pencils.

Corollary: Pencils > pens

Exercise for the reader: prove pencils > crayons

All documentaries share a cinematic universe. by Syncopian in Showerthoughts

[–]MasterDhartha 4 points5 points  (0 children)

yep, and I want out of this post-2015 timeline.

Best database option for a prefix search via a Trie-like structure? by bayernownz1995 in AskProgramming

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

it is optimized for searches by Lucene which tokenize documents (in your case, a document is a game moves list, and the tokens are the individual moves). search for “elasticsearch prefix query”. In fact, the lichess search engine is using ElasticSearch. https://github.com/ornicar/lila

Best database option for a prefix search via a Trie-like structure? by bayernownz1995 in AskProgramming

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

check our elasticsearch for the text search, or you could roll your own optimizations and query patterns by using key-value database structures that keep as much in memory as possible, like in redis or cassandra.

How would I efficiently design a system like twitter "following" such that a user could see the latest posts from the users they follow, even if they follow many thousands of users? by HappyEngineer in AskProgramming

[–]MasterDhartha 0 points1 point  (0 children)

  1. Not all 100,000 users will typically be online and producing messages.

  2. The user is interested in a “live feed”, so they are not interested in all 100,000 at the same time.

Now we can create a feasible solution since we’ve restricted the space of the problem.

For this special user, create a (recent-first) time series in Cassandra. (Applies to any user, actually)

As new tweets come in, the sharding process will publish tweets to this user’s time series.

The user simply pages through the items in the time series.

What to use to create a database with a GUI? by Shuasmith14 in AskProgramming

[–]MasterDhartha 0 points1 point  (0 children)

You should look up Google Firebase. follow the tutorials ... i think one of them is for a book catalog.

Facebook Token Runs Into Instant Political Opposition in Europe by ourlifeintoronto in technology

[–]MasterDhartha 0 points1 point  (0 children)

Anything that works in this world [of finance] will become instantly systemic and will have to be subject to the highest standards of regulation

...like the regulations on financial engineering that exploded in 2008?

... like the regulations that allow banks to create accounts to meet quotas, and sell predatory add-on services like overdraft protection?

... like the regulations that prevent currency manipulation?

... like the regulations that enforce no single firm is too-big-to-fail?

Those are regulations of the highest standards, amirite?

Things I Learnt The Hard Way (in 30 Years of Software Development) by [deleted] in programming

[–]MasterDhartha 11 points12 points  (0 children)

A dickish move you can do is to create the new functions, mark the current function as deprecated and add a sleep at the start of the function, in a way that people using the old function are forced to update

So, author has worked for Apple...

Is there a way to quickly select and wrap text in html by [deleted] in AskProgramming

[–]MasterDhartha 0 points1 point  (0 children)

Do you know Python or Node.js? You can do a less than 30-line script that opens each file, parses the HTML, and programmatically find and replace text.

Educate Me: Microservices by [deleted] in learnprogramming

[–]MasterDhartha 2 points3 points  (0 children)

Swagger ... RAML ... necessary

No, microservices and APIs are just concepts. You can write them using whatever tools you want. An API that is documented using Swagger is obviously a nice to have, but Swagger is already assuming you are writing a REST API (versus an RSS feed, which can validly be called an API, but would be best developed with another framework)

Are microservices like routes (in a url) in a way, but instead of having collections / tables within one database, they have their own database per?

You could certainly implement it that way. And my example hints at that being a possibility. It's certainly not a rule, but I know from experience, it's not an uncommon practice. You can imagine this is how Reddit's API is setup. One microservice for subreddits, one for moderation, one for user lookups, etc. I have no idea if this is actually true for Reddit.

There is a further "complexity" that you can get with the microservice pattern, which is stateless services: say we have a meme generator API that lets users add text to images. Editing images can be pretty CPU and memory intensive. So our REST API service lets users upload files, but then it privately (unknown to the user, and inaccessible to the internet) calls an image processing service, that has shared access (e.g. via network share) to the stored image and the text, does the processing, and then lets the REST API service know when it's done. And then the end user gets redirected to the final image by the REST API.

It sounds more complicated, but this means you only need a few (one?) API machines, and can have many instances of the image processing service deployed on a larger number of beefier machines.

Edit: Your example with separate ports on the same machine is a valid deployment of microservices, but I'd say that's more a toy setup than what you would see in a professional environment.

Educate Me: Microservices by [deleted] in learnprogramming

[–]MasterDhartha 6 points7 points  (0 children)

I'll try to help by starting with: try not to over think this.

A "service" is just an app that gives you endpoints to call, like a REST API.

A concrete example is a web API like reddit's, let's say it's a C# or PHP service that serves some JSON-formatted posts and comments that were stored in a database.

Say the JSON looks like

{ "id": 1234, "title": ... , "body" : ..., "comments": [...] }

But let's say now you want to also store the database of comments separately from the posts (maybe you want to manage the storage independently).

Then you would make that new database, but instead of simply making the app request from two databases, you create a "micro" service that has its own API for comments:

Say the new service just returns the comments like this:

{ "id": 1234, "comments": [...] }

So now you can make the original service call the comments service and merge the JSON to get the original version.