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:
    But you said pine apple...
  • Psionic Roshambo @ Psionic Roshambo:
    Ughh gonna be bored today, class for new job has a lot of networking material and I'm certified in that already...
  • Veho @ Veho:
    Peen apple.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    "pine unf apple" doesn't count! Lol
  • Psionic Roshambo @ Psionic Roshambo:
    Employee code of conduct videos are awesome!!! Did you know eating the other employees is bad? I didn't know... Lol
    +1
  • AncientBoi @ AncientBoi:
    Anymore males there? :blush:
  • Psionic Roshambo @ Psionic Roshambo:
    All of us lol
  • Psionic Roshambo @ Psionic Roshambo:
    I got free every channel so that's awesome lol
    +1
  • AncientBoi @ AncientBoi:
    Give me ALL the gay pron channels, since you won't be watching them :blush::D
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Lol they exist?
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Hmmm so Mario Does Luigi's plumbing is a bad movie? Lol
  • Psionic Roshambo @ Psionic Roshambo:
    These videos are soooo dry
  • Psionic Roshambo @ Psionic Roshambo:
    Please click all suspicious links sent your email
    +1
  • BigOnYa @ BigOnYa:
    What to do today? Cut grass for 3-4 hours, or just get drunk and play video games... Hmm
    +1
  • BigOnYa @ BigOnYa:
    I need a remote controlled mower, so I can sit on the couch and do both.
  • BigOnYa @ BigOnYa:
    Sounds good to me, video games and booze it is then.
    +1
  • denpafan @ denpafan:
    Good choice
    +1
  • BigOnYa @ BigOnYa:
    Now what to play, Starfield or Fallout4. And what to drink, beer or Whiskey and Coke. Such tough decisions.
  • BigOnYa @ BigOnYa:
    Looks like its whiskey & coke, only 4 beers left. And think ill start with Falllout. :grog:
  • rqkaiju2 @ rqkaiju2:
    THIS IMAGE IS SO SCARY WTF. THAT SURE AS HELL IS NOT A CAT THATS LIKE A FUCKING DEMON

    Untitled2.png
  • Psionic Roshambo @ Psionic Roshambo:
    Bonus points for running things over with the lawn mower?
    Psionic Roshambo @ Psionic Roshambo: Bonus points for running things over with the lawn mower?