HackerTrans
トップ新着トレンドコメント過去質問紹介求人

vitorfs

no profile record

投稿

How to structure a Django project for production

simpleisbetterthancomplex.com
2 ポイント·投稿者 vitorfs·5 年前·0 コメント

Berkshire Hathaway to Buy $500M Stake in Brazil’s Nubank

wsj.com
4 ポイント·投稿者 vitorfs·5 年前·0 コメント

Nike Sues MSCHF over Unauthorized Lil Nas X's ‘Satan Shoes’

nytimes.com
7 ポイント·投稿者 vitorfs·5 年前·0 コメント

コメント

vitorfs
·3 年前·議論
Our infra is all on us-east-1.

Our EC2s seems to be working fine. But RDS is down for us.
vitorfs
·4 年前·議論
The DBZ chars were my favorites. I have some good memories of playing it for hours with my friends as well. We used to share the same keyboard to play. The first player would use the arrow keys + page up/down home/end etc and the second player would use YGHJ as the arrow keys + QWEASD as the main buttons to play.
vitorfs
·4 年前·議論
This thread brought many memories. Like others here, Mugen was my first experience with something that looked/felt like programming. I think I was 11 years old or something.

I remember that I was obsessed with Mugen. I would spend hours downloading chars/stages/screen packs and making my own games combinations. Eventually I started messing around with the source code of the chars/stages etc and started to learn on my own. I never really learned how to build chars properly, but I was good with the screen packs and stages.

Something that I find amusing is that some of the screen packs that I ripped from NeoGeo games and adapted for Mugen 20+ years ago are still available and I guess some people still use them :-)

Two cool works I did was ripping the Real Bout Fatal Fury 2 [1] and KOF'96 [2] screen pack. I even found some videos on YouTube. One of those videos the person who uploaded the demo even gave me the credits after all these years. The second one there was no mention but I know for sure this is my version because of the quirks/bugs :-) I never knew how to properly align the numbers with the texts on the combo/hits sprite messages that are shown during combat haha

[1] https://www.youtube.com/watch?v=AXecBx9oLrI

[2] https://www.youtube.com/watch?v=DcZBoTt6DEU
vitorfs
·4 年前·議論
I have always used single quotes for Python code since I start working with it. When I started to adopt Black on my projects it indeed felt weird and the code looked unpleasant. But after a while you get used to it.

Some people make the case that it's easier to write single quotes (well, depending on the keyboard format anyway). For keyboards in the US standard you have to hold the Shift key to write a double quote. But the good thing about Black is that you can still write your code using single quote and when you run the command line utility it will fix/normalize the code to use double quotes.

Nowadays I got so used to it that I even write my Python code using double quotes. And looking at Python code using single quotes looks weird/unpleasant for me.
vitorfs
·4 年前·議論
This is such a great news. We've been using Black in the company that I work for the past 3 years or so and it was a game changer for code reviews. Hopefully other open source Python/Django projects will follow the lead.
vitorfs
·5 年前·議論
My favorite free/loginless tool is https://excalidraw.com/ I use it on a daily basis to quickly sketch some ideas and document features etc
vitorfs
·5 年前·議論
It's 3 am and I'm currently doing just that. It's the moment where the world stops for a couple of hours and no one expects anything from me. My phone is not going to ring, no one is going to send me an email or expect an answer. It's weirdly peaceful
vitorfs
·5 年前·議論
I actually like the Django ORM. Something that I learned working with Django 8+ years is that to use its ORM effectively, you have to play Django's game. Sometimes just by denormalizing a few fields will make some queries/relationships way easier.

At work we have a marketplace engine and a digital wallet/financial app built entirely with Django (100k+ loc) and we don't have a single raw SQL query, everything is done with the Django ORM.
vitorfs
·5 年前·議論
I'm about to lose $4,800 in credits from Digital Ocean. I've been promoting them on my blog for the past 5 years or so

Something that I found weird is that they mentioned on the email I received:

> Please note that since all of your referral credits were issued more than 12 months ago, they will all expire starting next week.

Either the wording is odd or it's just my interpretation, but from what I understood they are implying that all my credits are older than 12 months

But the thing is I have several credits issued this year:

May 06, 2021 April 07, 2021 March 08, 2021 February 02, 2021 January 08, 2021

Or they consume the credits from newer to older.
vitorfs
·5 年前·議論
that's a good point and I agree with you

to be honest jekyll still serves the purpose really well (especially for the reader)

the site is still sitting on an inexpensive entry-level cloud server, it's relatively fast, serves 300k+ page views every month and it give me some passive income

i'm pretty sure that if one uses the framework properly it can still hold on very well

i think what left me with a mixed feeling about static site generators is that it is constantly holding you back whenever you think about growing your website. i ended up building a django api that runs on the same vpc as the blog itself, and i used it to expand some features, like reading from google analytics the total page views for a given blog post, or consuming the disqus api to list the latest comments on the home page. this kind of thing.

managing the posts in static files is quite challenging as the number of posts grows. at some point you will want to change some info, or add a certain metadata and you will need to write a script to walk the _posts dir and edit the files (maybe there's a better way of doing that :P)
vitorfs
·5 年前·議論
hey, thanks! :D
vitorfs
·5 年前·議論
yes because of a bad design decision I made to create a custom "related posts", which is a code that searches all my markdowns to pick the best pages and add to the current page. so even with `--incremental` it take quite some time to regenerate
vitorfs
·5 年前·議論
I started my blog about python/django (https://simpleisbetterthancomplex.com) using Jekyll and hosting on Github Pages and it was pretty good to get started because back then I wasn't sure if I would keep it up or not.

After a year or so I migrated to a 5 USD droplet on Digital Ocean (back then GH Pages didn't offer https for custom domains) and integrated with Github webhooks to automate the deployment when pushing new markdown to the main branch.

Over the time it indeed started to degrade. The build time takes almost a minute, but after building the website is just a bunch of static html pages.

Nowadays it is annoying to write new posts because I like to write locally and refresh to browser to check if it's looking good or not. So I would say it degraded for me but for the reader it's still as fast as it was when there was just a couple of posts.

I thought about migrating the blog to something else, but because I used some custom markdown extensions for code highlight and other things, it would be painful to migrate all the blog posts. So I've been postponing it since 2019.