Homebrew [WIP]NTRDB

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
upload_2017-2-27_20-16-56.png

Installed SSL properly
 
  • Like
Reactions: adrifcastr

DiglidiDude

Member
Newcomer
Joined
Oct 8, 2014
Messages
18
Trophies
0
Age
30
XP
122
Country
Canada
I've been looking at the code and have successfully deployed the python site on my local environment.

However, I'm really confused : Why did you use Python to code the backend of your website?

This is gonna sound like a subjective and elitist opinion, but when I see the lengths you go through to implement basic website features like route-handling, POST/GET HTTP requests, database and REST Api, and yet certain routes don't render well due to having the wrong Content-Type being applied or something revolving around the way you manipulate response headers, and judging from my 4 year+ career experience in web development, I wonder if it would have been better to write it in NodeJS using the ExpressJS engine with a few middlewares thrown in?

Again, not trying to be an ass. I don't have much experience with Python aside from writing file transformation and manipulation scripts that I run once and forget about, but I really believe it could've been done with much less time and efforts using at least some HTTP server framework for Python that's similar to what ExpressJS can do. Response headers are handled manually, which is error-prone and won't scale well in the future.

I think this is some impressive code, don't get me wrong, the complexity of the process is impressive, however there's without a doubt a much faster and easier way to write the backend of your website that's also less error-prone.

This is what's not making me want to contribute to the codebase; There isn't enough abstraction with the way you handle serving HTTP requests, making it more painful than it should be.

But really, don't take it personnal, I'm not dissing you, I can tell you're well-versed in Python and are very comfortable in that language just by reading your code, so I know you'll make it in the end. All i'm saying is, with how simple that website's use is (essentially it's a web interface for CRUD interactions with your plugins database coupled with authentication for plugin authors to update their own publications themselves) it could've been done faster and easier, and less error-prone.
 
Last edited by DiglidiDude,

thunderjackl

Well-Known Member
Newcomer
Joined
Oct 5, 2016
Messages
74
Trophies
0
Age
34
XP
87
Country
United States
I've been looking at the code and have successfully deployed the python site on my local environment.

However, I'm really confused : Why did you use Python to code the backend of your website?

This is gonna sound like a subjective and elitist opinion, but when I see the lengths you go through to implement basic website features like route-handling, POST/GET HTTP requests, database and REST Api, and yet certain routes don't render well due to having the wrong Content-Type being applied or something revolving around the way you manipulate response headers, and judging from my 4 year+ career experience in web development, I wonder if it would have been better to write it in NodeJS using the ExpressJS engine with a few middlewares thrown in?

Again, not trying to be an ass. I don't have much experience with Python aside from writing file transformation and manipulation scripts that I run once and forget about, but I really believe it could've been done with much less time and efforts using at least some HTTP server framework for Python that's similar to what ExpressJS can do. Response headers are handled manually, which is error-prone and won't scale well in the future.

I think this is some impressive code, don't get me wrong, the complexity of the process is impressive, however there's without a doubt a much faster and easier way to write the backend of your website that's also less error-prone.

This is what's not making me want to contribute to the codebase; There isn't enough abstraction with the way you handle serving HTTP requests, making it more painful than it should be.

But really, don't take it personnal, I'm not dissing you, I can tell you're well-versed in Python and are very comfortable in that language just by reading your code, so I know you'll make it in the end. All i'm saying is, with how simple that website's use is (essentially it's a web interface for CRUD interactions with your plugins database coupled with authentication for plugin authors to update their own publications themselves) it could've been done faster and easier, and less error-prone.
Question: would I have to take a computer science class at my high school to go to college for anything related to computer programming?

Sent from my SM-G550T1 using Tapatalk
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
it could've been done faster and easier, and less error-prone.
Yeah man, just use PHP next time, it's pretty much built for handling web requests, setting response type headers is as simple as "header('Content-Type: application/json');", there's seriously no reason to have done it in Python /s

Dude wrote it in what he knows, using the methods he knows. Maybe Node is easier for you, PHP is easier for me, hell RPG may be easier for some 80 year old IBM programmer, but that doesn't mean it's the answer to his problem. If you want to contribute, cool, contribute, but don't bash on the way he implemented it because "it could be easier". There's easier things than Node too.
 
  • Like
Reactions: OctoNezd

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
Yeah man, just use PHP next time, it's pretty much built for handling web requests, setting response type headers is as simple as "header('Content-Type: application/json');", there's seriously no reason to have done it in Python /s

Dude wrote it in what he knows, using the methods he knows. Maybe Node is easier for you, PHP is easier for me, hell RPG may be easier for some 80 year old IBM programmer, but that doesn't mean it's the answer to his problem. If you want to contribute, cool, contribute, but don't bash on the way he implemented it because "it could be easier". There's easier things than Node too.
Code:
self.send_header('Content-type', 'application/json')
 

adrifcastr

Well-Known Member
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
@OctoNezd NTRDBI requires the links to be direct links for raw plg files. please find a way to reject links to zip files, and point it out in red that raw plg file-links are needed, else the plugins won't be downloaded by ntrdbi
 

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
@OctoNezd NTRDBI requires the links to be direct links for raw plg files. please find a way to reject links to zip files, and point it out in red that raw plg file-links are needed, else the plugins won't be downloaded by ntrdbi
How about auto-unzipping? I know that some people adds .zip links because there multiple regions
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    It could get banned from PSN but you can change your ID I think?
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    K3Nv2 @ K3Nv2: Did you try wearing them?