HN user

nitred

204 karma
Posts3
Comments42
View on HN

UPDATE:

The requirements have been brought down to 1200VA so the APC SMX2000LV (2000VA) seems to be a good choice for UPS. It's much cheaper on Amazon too.

There's a company called mediproducts that offer UPS units for medical equipment but their pricing is opaque at the moment.

Ideally I'd love to chain an affordable battery backup solution like EcoFlow or Anker Solix along with a good APC UPS. But I'm concerned about chaining two sine wave generators (they become sine wave generators when there's a power outage). But I have no clue if that causes any cascading issues or not.

I checked out EcoFlow a few weeks ago along with the Anker Solix range. Anker's switching times are around 20ms and I wasn't able to find EcoFlow's switching times. The switching times indicate the UPS performance. It needs to be quite low for sensitive equipments like a dialysis machines. The APC SMX range provides switching times of 4ms.

my point is that being able to discern and limit the possibilities to something reasonable is a skill that has nothing to do with seniority and everything to do with general (read: fixed) aptitude

I disagree with that.

You don't need to be a genius to be a good developer, you can be learn to be one or you can be mentored to be one. Some aptitude is required, but nothing extraordinary. Hard work obviously is a good thing, but not a pre-requisite.

P.S. Our success criterias might differ though. I'm not part of silicon valley or FAANG so my standards might be lower than yours.

Hard disagree. The points about not working hard enough and checking out before 5pm sounds like you were just trolling or being cheeky. If you were then you can ignore my response.

The response sounds like it’s coming from someone who’s never thought deeply about problem solving and it’s relationship with mathematical complexity.

When one is given a task that they have no idea on how to proceed, to them, the number of solutions could be infinite. At that moment, even knowing what to Google could be overwhelming.

Imagine the junior developer being given a traveling salesman problem as their first task but neither the manager nor the junior developer recognize that the problem is a TSP problem. The Junior Developer can spend years and years rediscovering all the heuristics and algorithms related to TSP without knowing they’re actually doing that. You can’t google for it very well because the task doesn’t explicitly say TSP.

What you need is a Senior Developer to step in, hopefully they recognize it’s a TSP problem based on their experience, and then give context and an explanation on how to recognize such problems in the future and finally tell Junior Developer “Just Google traveling salesman problem”.

No working beyond 5pm needed. Junior dev is happy they solved the problem that was pushed to production, Senior dev is happy they don’t have deal with a pile of technical debt and Manager is happy that the task got delivered on time.

Kudos to the author for crystal clear one line summaries. As someone who struggles to write clear single line titles for Jira tickets, I don’t consider this ability to be easy or obvious.

Just tossing an opinion out there. In the last 10 years my editor progression has been notepad++ -> sublime -> atom -> vscode -> pycharm. Virtually every pixel on Pycharm is dedicated to at least try to let me write better python code and ease development friction. Lapce may eventually be vscode++ but I'm no longer in the market for general purpose editors.

This is easily a few thousand dollars worth of advice. I use PostgreSQL regularly but I would never have been able to come up with this solution myself.

Having queues on Postgres is going to be such a great addition to my tool belt especially since there's always a Postgres instance running somewhere anyway.

I know the first use case that jumps to mind is a job queues, but I feel like the method described in the article is quite low level which means it can be used as a base to solve many use cases.

* I won't have to reach for Kafka/Redpanda unless the rate of events/messages reaches 100k-1000k per day.

* I can add one column called queue_id where each unique queue_id refers to a new queue which means I can use a single table for multiple queues.

* If I add a new column called event_type, then I wonder if it's possible to create a composite event queue, where for example the query must return exactly two rows and one row must have event_type=type_1 and second row must have event_type=type_2 and both rows are locked and processed exactly once?

I think India has virtually the same problems as America or any other western country and a few problems that are unique to it like the caste system etc.

However the problems are more pronounced in India. There's more uneducated, more illiteracy, more corruption, more hatred among groups etc.

Having read the wonderful article about Going Critical [1] it's made me realize that, if one society is worse off than another by only 10% by some metric, it could mean that the society is far worse off than 10% due to cascading effects.

If you've ever been to India and stood by the side of a busy road in one of the poorer areas of a city, this or any other kind of news will not surprise you, infact I'm sure you will, like me, be dumbstruck as to how India manages to do keep it's shit together in the first place.

[1] https://meltingasphalt.com/interactive/going-critical/

My recommendation is to get into the habit using StrictStr, StrictInt and StrictFloat as your choice of types to start off with and use str, int, float etc only when coercion is acceptable.

Coercion is quite powerful and saves me quite a bit of work. I write validation for config files that non programmers create. I would happily avoid explaining the difference between a 1 and a "1" to them whenever I can and let coercion do the work. It reduces the mental load on them too.

In my opinion Pydantic is Dataclass++ and NamedTuple+. I use it everywhere performance is not critical. It does type casting and provides an option for strict types. It lets you use custom types where you can define min and max size of a list or tuple etc. Every time I had a weird validation I needed to do, the Pydantic docs already had a built-in way to do it (E.g. conlist).

It has excellent support for JSON and JSON schemas out of the box.

Error messages are excellent! Tells you exactly what went wrong (most of the time) during validation.

I do use Pydantic even when Dataclass and NamedTuples are sufficient, I know that's a bit cargo cultish but it lowers the mental overhead by just having to perfect one of way of doing things.

You can use any tool you like, but it triggers me every time some says something misinformed about `conda`. So please if you have anything negative to say about it, please read the official Managing Environments page of `conda` before doing so [1]

* Please don't confuse `conda` with Anaconda, Miniconda & Conda-Forge.

* You can use `conda` to manage your environment and it can download and install ALL your packages from `pypi.org` and not Anaconda.

[1] https://docs.conda.io/projects/conda/en/latest/user-guide/ta...

Depends on the blue light filtering glasses you use. I have a -0.75 prescription D and my historical average screen-time over the last 10 years is around 8-10 hours per day (including weekends).

I've been prescribed regular glasses for my myopia with blue light filter and the doctor insisted I use them while I am in front of the screen. These don't work. I started off as a biomedical engineer, so I know that myopia correcting glasses actually make your eye muscles work more i.e. not-relaxed. If anything I argue that you need to use a lower prescription or an opposite prescription to keep your eyes relaxed (not medical advice).

I was struggling with headaches and tiredness due to my excessive screen use even with my prescription glasses. Then I found Gunnar Intercept glasses with 65 Amber tint. Completely different experience. If I get up from the screen, it's not because of tiredness. As a matter of fact, I have been institutionalized - I cannot work in front of the screen without these glasses.

It takes an entire day to get used to the amber tint, but once you get over it, you can't go back. My opinion but I would recommend trying them out if you can afford a $50 experiment.

I wonder if in a decade or so, large tech companies will unseat Disney, Warner Brothers etc as creators of animation movies.

While the results on Nvidia's website aren't too impressive, if you look at the history of animated movies [1], one can see how trivial and simplistic the art and animation was.

Having had some experience doing some research on GANs at university, I know them to be very powerful. What's very important to note is that the images generated my the model are truly "novel" i.e. completely fictitious. The images generated may be biased to some of the training data such as color and texture of the water and rocks for example, but every image is a fantasy of the model. The only way the model can generate such realistic images is because it has a very good abstract internal representation of what oceans, waves, rocks are.

Back at university, I pitched the idea to my professor of using GANs for generating "novel" images in real time while parents would read bed time stories to children. I didn't get very far. Glad to see some real progress in that direction.

[1] https://www.filmsite.org/animatedfilms.html

I have a question for devs in Germany/Europe. Is it a violation of Datenschutz/GDPR if the recruiter sends a first email with a link to a video/website that tracks whether I clicked on it or not and then they send me a follow up email because they know I clicked on the link from the first email?

I face these issues on the daily. Pycharm's type checking is sufficient for my use case but the TypeVar and Union type checks are a bother and I always pay close attention to it. Really appreciate the fix(es)!

Can't speak for the OP but here's what I think they may have meant and my intuitions agree with them as well.

In python I mostly use threads for non-CPU intensive tasks like IO or timers or event handling and I rarely implement these myself.

However for CPU intensive tasks, there's rarely any point to having 10 threads in Python because they all have to run on one core because of the GIL. Therefore when working with python the GIL indirectly lets me never have to think about writing concurrent CPU intensive code AND I know others wouldn't do it too because it wouldn't make sense most of the time. This is leads to a significant reduction in cognitive load when thinking about solving a problem in Python. And it isn't about thread-safety but that in concurrent code I have to worry how other threads might change the values of shared variables and global variables of which there are many.

Instead the GIL lets me think synchronously, write synchronous code and when I needed to parallelize my work I use multiprocessing where my synchronous code and assumptions work perfectly because each process has its own GIL and I explicitly pass shared variables to each of the processes.

I don't know enough to comment on the good or the bad of GIL. Just my two cents about how I think about code with Python in it's current state.

I faced this exact problem a few days ago i.e. having to build one model for SQLAlchemy and an identical Pydantic model to validate the data (outside of the FastAPI context)! Will be using it the next I need it.

@tiangolo I would like to use this for production at work, however I'm a bit hesitant about using the 0.0.x versions. Would you recommend me to wait until version 0.1.0 or 1.0.0?

> At this higher level of emergence (human behavior) the information transmitted through the network is different than what you would see at that lower level.

I understand that the information is different or more complex. But so long as this information follows some predefined rules then it lends itself to optimization algorithms such as root finding and gradient descent.

For example in an MLP, a common activation function that is used is a sigmoid function whose values falls in the range of [0, 1] and the function is differentiable and therefore you can run backpropagation to train the MLP.

Similarly in a human-MLP, the activation function is a human who is capable of understanding (input) and producing (output) multiple kinds of complex information types. Now let's say the humans produce a payload/output and the algorithm passes on this information onto the humans in the next layer based on the weights between the humans.

To give you a real example of how it can be used, let's used a modified version of the game of charades. Imagine there's a 2x2 layered human-MLP i.e. 2 humans in layer 1 and 2 humans in layer 2. There are no teams and there's one moderator who whispers the word to draw to the humans in the first layer. It is the job of the humans in the second layer to guess correctly.

* The humans in the first layer each draw the image of the word with their own artistic style.

* The algorithm decides depending on the weights and some randomness which image goes to which human in layer 2.

* The humans in the second layer receive this images anonymously and they make a guess.

* The algorithm decides what the final output is after weighting the outputs from the humans in layer 2.

- How does backpropagation take place here? I don't know. To begin with we can use Word2Vec to determine magnitude of error in the guess vs the right answer.

- How do you find the derivative of the human's activation wrt to the weights? I don't know. But I'm sure you can come up with interesting new strategies for it.

Some additional points:

* Another example could involve a neural net of software developers trying to build an application. Where over many iterations of building several applications, the algorithm learns that certain sub tasks are best given to certain developers (i.e. neurons) and certain sub tasks need to be given to multiple developers since it might be a difficult or an error prone problem to solve.

* The neural network architecture needn't be limited to just MLPs, they can be recurrent, convolutional or anything else.

* Obviously the problem I am unable get around is how the inputs and outputs are to be defined for given problem. Given that the neurons are humans who can solve quite general problems themselves, the inputs and outputs needn't be limited to just numbers.

* The optimization algorithm determines to whom these messages are sent and with what "weight".

To state some of the obvious:

- A neural net of just one human is AGI

- A company or any organization of humans can also be considered to be AGI. However the focus of my question is whether we can capitalize on the recent developments we've made in the neural networks architectures and optimization techniques and apply it to a neural net of humans.