So your hand coding but using in OpenDAWS doesn't that defeat the purpose of doing it all yourself from first principals?
Hand Coding A Personal Website
11–20 of 55 posts
Re: Hand Coding A Personal Website
#12Having written pages, by hand, for ages now (like 15 years or so), I recently took this to a new level. I'm now hosting my site on my own hand coded webserver and no other server in front (please don't make me explain).
Please DO explain. I'm going to guess at a PHP based site? I couldn't imagine trying to run my personal website ( https://github.com/Imdsm/PersonalWebsite/ ) on a hand-written web server and database server, though if I did that would be an achievement.
However I too would be interested in reading more about the previous commenter's set up.
Re: Hand Coding A Personal Website
#13Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…
Agreed, and not just for performance reasons but security as well.
While a correct set up wouldn't allow write access to the docs root nor developers to copy up hidden files, sometimes a sysadmin drops the ball. So disabling the use of .htaccess files prevents an attacker from changing your Apache configuration without gaining root access (and if that happens, then it's already game over).
Re: Hand Coding A Personal Website
#14Re: Hand Coding A Personal Website
#15However, I am at the opposite end of the spectrum. I have never used a template or boilerplate or anything. Every time I've tried to use a prefab site I end up spending hours tearing it apart and feel like I am going backwards.
That being said, I cannot really recommend my approach - find a happy middle, and your productivity will soar.
Re: Hand Coding A Personal Website
#16Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…
How many Billions of visitors you need, until a local .htaccess slows down your Website significant ?
o How deep the page request is (as Apache cascades it's checks down the directory structure, so /article/year/month/day/page.html could look for a .htaccess file in 4 different locations before even reaching /.htaccess.
o The IOPS of your storage (super fast SSD, slower NFS server, SAN? etc)
o And whether your host OS has done any file caching (dependant on if a file exists and if it's been modified outside of the OS, in the case of network mounted file systems)
So the only way to know precisely would be to benchmark (a basic load test should suffice). However if you're running a blog on a VPS and you occasionally have articles hit HN and other aggregators, then disabling .htaccess (amongst other free tweaks) could be enough to prevent your site getting DDoS'ed offline if/when you hit the front page.
Re: Hand Coding A Personal Website
#17Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…
I can't agree with the first. Most of the arguments from the quoted post are the result of bad practice with preprocessing, not preprocessing itself. For example, the "Dumb code duplication is dumb" example is just someone writing things badly. It should have been written as: .error-default, .error-special { @include error; } .error-special { background-color: #fcc; } Similar arguments can be made for most of the oth…
I agree with that, but I think that is precisely the point of the quoted post: CSS preprocessors, not unlike compile-to-JS languages, try to make you write less, at the cost of pushing you to write badly.
Of course, with a full mastery of LESS, you will not make those mistakes. But you will probably make them a lot while learning to become such a master.
Re: Hand Coding A Personal Website
#18Having written pages, by hand, for ages now (like 15 years or so), I recently took this to a new level. I'm now hosting my site on my own hand coded webserver and no other server in front (please don't make me explain).
Re: Hand Coding A Personal Website
#19It was an interesting exercise. The output is here - http://archisman.com/
Re: Hand Coding A Personal Website
#20Earlier quoted context omitted.
Please DO explain. I'm going to guess at a PHP based site? I couldn't imagine trying to run my personal website ( https://github.com/Imdsm/PersonalWebsite/ ) on a hand-written web server and database server, though if I did that would be an achievement.
It could be something like Go or Java which would provide the basic framework for you and "all" you need to do is write the handlers (this is how my latest project is written) rather than writing their own HTTP classes and just using the languages TCP/IP libraries. However I too would be interested in reading more about the previous commenter's set up.
I wonder about the performance and reliability of libraries like those (Go's http package, Ruby Sinatra/WEBrick, etc.); if they can be used in production.