Live data from Hacker News

Show HN: A Python native engine for web development

github.com

1–10 of 17 posts

Re: Show HN: A Python native engine for web development

#3
Sorry, but this is really not suitable for much. There is so much wrong with this implementation that I’m not sure where to start. Every call to your template writes to a single file called “index.html”[1] which is then copied to another file when “written”[2]? You also print exceptions rather than allowing people to handle them as they wish.

The idea is nice, but try and remove all file system calls and do this entirely in-memory. This may mean completely changing the API.

1. https://github.com/BrainStormYourWayIn/sierra/blob/main/src/...

2. https://github.com/BrainStormYourWayIn/sierra/blob/main/src/...

Re: Show HN: A Python native engine for web development

#4
Unfortunately my Python skills start and stop at pandas and I use Rails for web development so I can’t comment on the actual code base in any meaningful way.

I just wanted to congratulate you on committing to something and putting yourself out there and am only commenting because you only got one response and that was a negative one which I know can be demoralizing. Saturday night was not the best time to post it, I recommend Monday morning when a lot of us are spending more time on HN than we should be and are more likely to engage with your post.

Regardless of what the actual quality of Sierra ends up being right now, you should be proud of yourself for doing what a lot of is struggle to do. You picked something, did it, and shipped it to the world for criticism. Good luck with your project!

Re: Show HN: A Python native engine for web development

#5
post #3

Sorry, but this is really not suitable for much. There is so much wrong with this implementation that I’m not sure where to start. Every call to your template writes to a single file called “index.html”[1] which is then copied to another file when “written”[2]? You also print exceptions rather than allowing people to handle them as they wish. The idea is nice, but try and remove all file system calls and do this enti…

Yeah, you're absolutely right, I wasn't able to really think of another way to implement it. [2] was meant to be implemented with Flask, which is optional, so the files can directly be written to templates/ and static/. We're actually changing this. Can you give a few suggestions on how it must be implemented? We want to work on this

Re: Show HN: A Python native engine for web development

#6

Unfortunately my Python skills start and stop at pandas and I use Rails for web development so I can’t comment on the actual code base in any meaningful way. I just wanted to congratulate you on committing to something and putting yourself out there and am only commenting because you only got one response and that was a negative one which I know can be demoralizing. Saturday night was not the best time to post it, I…

Well said, good job OP.

Re: Show HN: A Python native engine for web development

#7
post #3

Sorry, but this is really not suitable for much. There is so much wrong with this implementation that I’m not sure where to start. Every call to your template writes to a single file called “index.html”[1] which is then copied to another file when “written”[2]? You also print exceptions rather than allowing people to handle them as they wish. The idea is nice, but try and remove all file system calls and do this enti…

Also, mighty thanks for actually taking the time out to check out the codebase. This is my first proper project, and I really appreciate this

Re: Show HN: A Python native engine for web development

#8
Since you mentioned this was your first serious project and some others were giving advice: in the future, I would recommend using snake_case rather than camelCase for Python projects. Not due to any subjective feelings about it, but just because that's the idiomatic Python convention. It's what the standard library and almost all third-party libraries use.

snake_case: Python, Ruby, Rust

camelCase: JavaScript, Java, C#, Go

Re: Show HN: A Python native engine for web development

#9
post #8

Since you mentioned this was your first serious project and some others were giving advice: in the future, I would recommend using snake_case rather than camelCase for Python projects. Not due to any subjective feelings about it, but just because that's the idiomatic Python convention. It's what the standard library and almost all third-party libraries use. snake_case: Python, Ruby, Rust camelCase: JavaScript, Java,…

I always use snake_case. But the guy I'm working with always insists on using camelCase, though he's never used Java/c#/Go. I don't like it, so sometimes we make compromises there. Thanks for the advice

Re: Show HN: A Python native engine for web development

#10
post #7
post #3

Sorry, but this is really not suitable for much. There is so much wrong with this implementation that I’m not sure where to start. Every call to your template writes to a single file called “index.html”[1] which is then copied to another file when “written”[2]? You also print exceptions rather than allowing people to handle them as they wish. The idea is nice, but try and remove all file system calls and do this enti…

Also, mighty thanks for actually taking the time out to check out the codebase. This is my first proper project, and I really appreciate this

Its no problem! I'm sorry if it came across as harsh
Post reply on HN