Hacker Newsnew | past | comments | ask | show | jobs | submit | 8589934591's commentslogin

What do you recommend to switch from Python to Java or JVM based languages like Scala? I have developer experience with personal projects, but I can't seem to get shortlisted to any of the bigger companies which use them.


No matter what I try, I can't get python to reach the top. :D

I like the website. It shows rust for a lot of options go as close to next best.


I'm a longtime user of gnucash and this is a great product to convince me to move to ledger/hledger.

Question for author - Is it mostly a reporting tool or does it work similar to h/ledger where I can input my transactions from paisa?

Question for HN users - have you found ledger to be easier to use compared to gnucash? My challenges have been my lack or ease of understanding on how to input transactions in ledger and also getting good reports comparable to gnucash. It's highly likely I'm unaware of how to use the tool properly but I am not sure where to learn this.


I made the switch to hledger about two years ago and I have struggled using the command line to input my transactions. Right now I use my text editor (nvim) and a snippet engine for my common / recurring transactions. This may be a little more work than just setting everything up to work automatically, but I like it. For reporting, there are some tools which can help with that, I used to use hreports [0], but have since switched to my own script, which exports the data from hledger and queries it itself.

A good (although opinionated) resource for learning how to use hledger is the manual, which goes in depth about different accounting and modeling concepts [1].

[0]: https://hreports.readthedocs.io/en/latest/readme.html

[1]: https://hledger.org/dev/hledger.html


Too opinionated ? I'd be interested in examples of that.


I did say "opinionated", not "too opinionated" and I believe that is a fair characterization, would you not agree?

Anyway, thanks for all your work on hledger and pta in general, Simon!


"although" made me think it might be too opinionated in places I should review. No matter, whatever you think of it is fair. Thanks!


> Question for author - Is it mostly a reporting tool or does it work similar to h/ledger where I can input my transactions from paisa?

It's a reporting + import/editor tool. The goal is to have a app that handles all the common use cases without going to command line.


Can you suggest some course(s) and/or language(s)?


Afaik racket can do all of what you have mentioned. I have run a few slightly non trivial dev systems using it with good success. Ofc, company never knew about it.


Wow. Can't believe a couple of these are in my production. Esp with the mixture of py2 and py3. And people who are not well versed in python are just not aware of these gotchas.

Good repo, I learnt quite a few more... wtfs. :)

I have a strong belief that unless type hints, testing, tooling is leveraged properly, python does not qualify as a good candidate for long term projects. Go handles all of this automatically and I'm having good results with it as an alternative to Python for small to medium scale projects.


Consider not holding strong beliefs without empirical evidence. There are both plenty of long term python projects that have held up, and no strong evidence one way or the other on type safety.


The only evidence I've seen in this respect suggests typing is not the leading cause of bugs in Python. I wish I could find the talk but essentially the guy looked at a load of GitHub issues and analysed the cause and only like 1% or so were type related.

I like putting in types just to help my IDE with autocomplete, though. I have also caught a few errors with mypy that could have caused a crash in very unlikely cases. I'm not convinced it's worth rigourously typing a project. It seems like mostly a nerd snipe because I've noticed there is a satisfaction with getting in right despite not making any difference to the user.


I'd say requiring types enables faster onboarding and development for new developers than catching bugs. Bugs can only be caught to a certain extent. But figuring out what a each variable is and what they signify when passing them around a large codebase, it becomes essential and helpful to type the code. Pair this with a good IDE/editor, your development is pretty fast.


There are both merits and demerits to python. Unfortunately not everyone has the opportunity or the luxury to work with projects that are properly maintained. Even messy python projects in legacy companies hold up but that does not mean quality and maintenance costs are good. My beliefs stem from my experience with the jobs available in my area and country. I'm not the expert on type safety but my understanding from various sources and my own experience is that type safety is superior. Go has been the best candidate as the alternative for the projects I have undertaken. YMMV.


For most of these type hints or static typing do not at all help. I haven’t went through all of them, but in the first quarter or so almost all of them were due to leaky compiler weirdness in CPython.


I haven't tested out the repo with type hints so I can't comment on that. What I did mean to say was outside of this repo, type hints are a huge boon saver. There are enough legacy projects written by non python experts which would benefit from whatever I said above.


I agree, there should be a book specifically made for python-wtfs, e.g. corner cases, practical hacks, name it as 'python traps and pitfalls'



Yes, that's the book. The source code is open-sourced,

https://xinu.cs.purdue.edu/


Out of genuine curiousity, what do you consider as serious production software? C C++ would probably help in embedded but I highly doubt they are used in every other domains.


Typically, the selection of a programming language is predetermined in brownfield projects, leaving little room for choosing the "ideal" programming language for migration unless it is absolutely necessary (go can be a suitable option for migrations).

Code, like the one provided by the OP, should be valued and encouraged to prevent future bugs. Incorporating tools like Mypy during pre-commit and pyright during code editing can make a significant difference. This approach helps eliminate the need for writing unnecessary unit tests that check for None type.

In my opinion, as a mid-senior developer, I always appreciate the use of types in Python. If you are confident about having predictable inputs, you can rely on duck typing and use it primarily for scripting purposes.


> Typically, the selection of a programming language is predetermined in brownfield projects, leaving little room for choosing the "ideal" programming language for migration unless it is absolutely necessary (go can be a suitable option for migrations).

Yep - or it's the standard for some tasks & the important thing is being able to use the ecosystem of external packages that everyone else uses. In this case, the author is working on AI & computer vision, for which everyone else uses Python. Python could be a much worse language than it is and using Python would still be the right choice in this scenario.


In computer vision, you use Python for prototyping and research. It of course gets rewritten if it's to be actually used, think for example of the guidance system in a car, plane, or weapon.

It's pretty much the same for AI, except that there is an increasing trend in AI of it being used by people that do not have the skills to do the productionization.


I agree that in most cases it should be rewritten for production, but in my experience that quite often doesn't happen, and AI stays in Python even for production usages.


Using static typing in Python will generally speaking significantly increase the number of bugs in the codebase.


Could you elaborate your statement? How? My experience says otherwise. I am interested to know your viewpoint and experience.


Of course, statically typed code is usually around 3 times the number of lines of code as it's dynamically typed equivalent.

This is due to lots of boilerplate, complex types, usage of abstract base classes, adding code for testing purposes into the production codebase due to disregarding language features such as mocking, etc...

The development time and bugs in a program are directly proportional to the total number of lines written.

You write 3x the number of lines of code using a verbouse code style then you have 3x the number of bugs. Static type checking only catches around 5% of bugs. It's not a significant debugging tool.

If instead of writing static types and all the involed boilerplate required to make it work, you instead invested that type in unit tests and proper qa, you will always come out ahead.


I'm pretty sure any serious company uses C++ for the code that matters, and Python for orchestration (assuming no high scalability requirements), GUI, offline data analysis and calibration, etc.


Your idea of "serious company" is outdated by at least 20 years.


https://support.google.com/accounts/thread/39666358/deleting...

This might probably help. Search by largest attachments and delete so you have some buffer space. Then you can select individual emails/emails per sender and delete them all.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: