7 ms·
Tell HN: I was tired of being a perfectionist so I built an app within 24 hours
Like probably many of you, I'm kind of a perfectionist coder/creator. Recently I'd been bookmarking interesting dark mode sites just because I liked their aesthetic, and because for some of the SaaS I want to make, I wanted to make it dark mode first rather than light mode like most sites, so I was looking for inspiration.
I'd amassed around 20-30 and I told my friends about these cool sites yesterday. They mentioned that me linking to each one was kind of annoying and they wanted to see all of them at once, similar to how Awwwards and other web design inspiration directories worked. I thought a making a dark mode directory was a great idea as I could just link one site to my friends rather than bombarding them with links.
I'd previously worked on other projects but I always spent too long nitpicking every detail. It always took so long that I lost interest after a while and the project was abandoned, or I overengineered the site so much that I didn't even get to the actual app functionality. People say to build an MVP as soon as you can, but for certain people, it can be quite a challenge to constrain yourself.
This time I told myself I'd do everything in 24 hours, as it's not a super complex idea to create. I bought a domain off Google Domains, used Next.js to spin up a React site, and basically converted my bookmarks into a JSON file along with their titles and descriptions. In the React side, I read the JSON file and put the URLs in iframes with another container with the title and description.
One tricky part was that many sites block iframes, so what I had to do was save the entire website into its constituent HTML, CSS, and JS, and I displayed that instead in the iframe.
Overall, I'm happy that I was able to execute on an idea within only a day of working on it. It's not a monetized product or anything, simply a directory, but still, it was fun.
The site is: https://darkmodes.com (I was surprised that the .com domain was actually available!)
Edit: If the link doesn't work, try https://darkmodes.vercel.app, having some domain issues right now.
- lifeplusplus 4y agoWere you exhausted at some point?
- satvikpendem 4y agoI didn't code for 24 hours straight haha, that would have been quite something. I did it more on-and-off over the course of that time.
- dorkwood 4y agoI thought you were going to say you built a tool for sharing any list of websites, although I guess that might take a little bit longer than a day. This is still cool though! Congrats on overcoming your perfectionism.
- Sujeto 4y agoBandwidth is probably like downloading a small video game
- quickthrower2 4y agoThis site crashed my ios safari. It seemed like you might be iframing other websites? Maybe just used too much memory.
- liminalsunset 4y agoiOS Safari at least used to limit the memory, particularly the WebGL GPU memory, to something like 15 MB after which it would hard crash. I think this might be what's happening here since all of the websites are iframed (there seems to be at least ten). Fwiw, it's very slow on desktop Firefox with M1 until all of them finish loading.
- satvikpendem 4y agoI did some more performance optimizations including lazy loading. Let me know if it is still slow.
- deleted 4y ago[deleted]
- reustle 4y agoBandwidth warning: opening this site downloads 87.9 MB in resources. Nice work though! I'd suggest moving to screenshots that toggle to an iframe once they're clicked.
- sam1r 4y agoThank you for this warning!
- deleted 4y ago[deleted]
- satvikpendem 4y agoThat's a good idea, maybe even a short gif/video of interacting with the site that turns into an iframe on click. I bet I could squeeze a video into only a few megabytes or fewer.
- systemvoltage 4y agoI want to inquire something that I feel only I have this problem: it takes me forever to make anything with code. Like hours to do something simple. I don't get distract that much, but coding is difficult and I've come to appreciate those who can code faster than me. First of all, I spend a bunch of time looking up the best way to write something. That means stackoverflow, searching for libraries, etc. Then, I would write with the debugger on. Making sure what I wrote works, one baby step at a time. I never write the whole thing in one shot like so many other programmers do. They just write pages and pages of code without ever running it, they just know its going to work (for the most part). Thoughts? How do you make progress in programming?
- b4je7d7wb 4y agoPractise. Once you are building roughly the same thing for the tenth time it will be ten times faster than the first time.
- Noumenon72 4y agoPerhaps I'm bad at generalizing, but after four years I feel like I am building "roughly the same thing" approximately 10% of the time. Other than SQL queries and REST endpoints, it's always mostly new technologies, new situations, and new worries. I think the personality type that reads a lot before starting the first time reads a lot before starting the tenth time, because you come back to it having learned so much and having new things you want to try. My advice for people like me is try to find a firm where you can be slow, because despite learning 1000 shortcuts you'll never be fast.
- maxbond 4y agoDon't try to write tons and tons of code at once without ever running or testing it, it's not like being a great programmer is about being so smart that you don't need to run code to see if it works. Focus on streamlining your workflow so that you can do what you're already doing more efficiently. I frequently create small experimental scripts to iterate on one aspect of a larger program, and then file that example away. I'll likely come back to it to copy code for months or years. Unit tests are your friend as well. The other thing is, read more code. Read some legendary projects in your preferred language. Read the source of your favorite framework. You don't have to read the entire codebase if you don't want, but try to understand enough of it to see where the most critical parts of the design are, and then understand how that was put together. If there are specific aspects to your programming you'd like to improve upon, and it's an area I'm knowledgeable in, I'd be happy to recommend specific resources.
- Falkon1313 4y agoNice, but, do you really need Next.js and React for that? What about just taking screenshots and linking them to the sites in simple HTML? Wouldn't that serve the purpose? I guess you wouldn't really call that an 'app', just a page. But it'd be pretty quick and simple. And if you really want to get away from over-engineering and getting lost in the code details, doing it without any code at all is a good exercise. Perhaps from there a simple script to take a list of URLs and generate the page's HTML, but still no libraries or frameworks. Scripts like that can live for many years, just being run as needed, serving their purpose with no maintenance or dependency or deprecation issues. Some scripts that I wrote are still running perfectly fine on their own, untouched after 7+ years, while the main application requires a whole team of people constantly maintaining it. It's good sometimes to get back to basics to put things in perspective. Things like the leftpad debacle of 2016 should make us think about how we build complex, fragile ecosystems that are constantly changing, and need constant maintenance, often to just do something simple that doesn't need all that complexity in the first place. How simple and quick can you do it? Do you really need code to dynamically scroll down to thing X, or could you just put that thing at the top to start with and not need any code or dependencies? You're on a good track. We over-complicate things a lot.
- deleted 4y ago[deleted]
- sublinear 4y agoI agree. Mounting a "dist" directory and spinning up nginx is a one-liner command for Docker. Using a static site generator would be a single for loop. The rest is a small amount of CSS. Bonus points if you write the selector necessary to "display: none" all iframes except one at a time. Solves the excessive memory problem. :p
- aembleton 4y agoNo need to run docker or nginx as it's hosted on vercel. Just push to a github repository
- aliqot 4y ago
- tmtvl 4y agoGiving yourself, say, 20 hours to build a kind of an application seems like a good way to learn quick iteration techniques. Coding challenges like Advent of Code or game jams like Ludum Dare can really push one to take a whole new approach to coding. Also, light themes are superior.
- qorrect 4y ago> Also, light themes are superior. What did you just say to me ? /s
- mrpurrfect 4y ago> I'm kind of a perfectionist coder/creator. Ok. Must be true if you are saying so. Perfect job with the website - downloading 88MB of data just because I accessed the site.
- SPBS 4y agoYou could have put it in a less sarcastic way. I don't see 88MB upfront anymore, because it seems to be lazy loaded (but still very laggy when it does). But it's not wrong to point out that the current UX is not perfect.
- satvikpendem 4y agoDid you really make this account just to write this comment lol Anyway, I did some more performance optimizations, it should load lazily more efficiently and not be as laggy when it does.
- stefanyas 4y agoIgnore that dude - nice job! I find it difficult to finish anything I start due to being a (self-proclaimed) perfectionist. It's nice to see someone with a similar problem going out of their comfort zone. Kudos!
- satvikpendem 4y agoThank you Stefan, appreciate your kind words. Hopefully you can try doing a 24 hour challenge as well, it really helps cultivate the shipping muscle (my friend once told me shipping is like a muscle, you need to work it regularly and practice it to get good at it, I really liked their advice).
- spencerchubb 4y agoThe true scrappy solution would be screenshots in a google doc. Not whatever you did here
- z9znz 4y agoThat was something. My M1 Air doesn't have fans, but the fans came on when I tried to load that forkbomb.
- v3ss0n 4y agoThat's a list that could be done in a markdown file with screen shots, render using a static site generator, not gonna classify as an app since it lacks input or automation. Using IFrame is really bad ux too. You could generate scrolling page gif screenshot
- satvikpendem 4y agoAlso I realize the site is very heavy since it's basically loading 20 other sites, if anyone knows how to make it load asynchronously or only what's in the viewport, as well as other ideas to keep the interactivity of iframes but reduce their size and loading speed, please let me know.
- daretorant 4y agoI recently did some optimizations on my personal website to make the images load “lazily.” In other words it only loads stuff once it hits the viewport. I think that’s what you’re looking for. I tried two techniques: 1. There is an HTML attribute to do just this and it seems to work for iframes too: https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading https://developer.mozilla.org/en-US/docs/Web/Performance/Laz... 2. There is a simple library called “lazy sizes” (https://github.com/aFarkas/lazysizes https://github.com/aFarkas/lazysizes) I tried to avoid the lib and use the native HTML… but for whatever reason the lib worked more reliably/effectively in manual tests as well as in my benchmarking via PageSpeed / Lighthouse. YMMV!
- satvikpendem 4y agoJust added the lazy sizes library, performance seems a lot better. Do you know how to change the placeholder for an iframe though? The docs say to use data-src for the placeholder but I'm already using that for, well, the iframe source URL. I also added the HTML attribute, not sure I can see any real change.
- csydas 4y agoI just tested on M1 Pro with Safari, and it loaded great even on really lousy internet where I'm at. So not sure if your optimizations are already in effect, but I'm not having the challenges others mentioned with the current version of site.
- satvikpendem 4y agoAwesome! Yeah I didn't do any optimizations when I first posted here, but I added lazy loading on the iframe as well as React component lazy loading, so it looks like it's working pretty well.
- tr1ll10nb1ll 4y agowouldn't call this an MVP. This is a notch above an MVP. I still like this, though. Resource-heavy but looks good.
- javawizard 4y agoOP: don't change a goddamn thing. Other commenters' suggestions are great, but that's the point: you built the thing and you released it. Doesn't matter if it's React, large, not static, whatever - it's done and it works. As someone who finds himself in a perpetual battle against the tendency to be perfectionistic: you are an inspiration.
- stoicjumbotron 4y ago100% THIS. I'm seeing the sentiment shared by other comments way to often regarding over engineering, stack preference, incorrect terminology and what not anytime someone shares something they made. Some feedback might be valid, but most of it is just unnecessary nitpicking. So keep doing what you're doing OP.
- matwood 4y agoAgree completely. All the nit-picking is why the hardest part of what the OP did is putting themselves out there. Releasing a project requires a mix of traits that are often at odds, naivety to think you can, humbleness to listen to valid feedback and ego to push down the path you think correct. No project is ever perfect and getting things out the door is always messy.
- satvikpendem 4y agoWell said, thank you. I like the mix of traits you mentioned, that's how I see it as well.
- websap 4y agoOP can ignore the cynicism from a lot of the commenters here, but can improve the app based on some of the suggestions, to improve the performance and learn some new skills.
- rpastuszak 4y agoThere’s a difference between explicitly asking for feedback and saying “hey here’s the cool thing I made, check it out!” HN comments often miss the context of a post and focus on nitpicking or giving unsolicited feedback. Many of the HN members I met (makers/hackers/students) lurk but rarely post here for that reason.
- wruza 4y agoLast week I received a badly written, details-lacking requirement to create a site that would take an amount and present a page to pay a tip, either one of fixed %, or a custom sum (including url signing, design and actual backend that talks to a payment processor and a client registry). Two hours of express, querySelectors and a page of css later I deployed it to DO Apps (add half an hour if it were a vps with a certbot) and moved on. I’m looong tired of setting up a scaffold, configuring configs, building builds, componentizing components, zealoting paradigms. If a way is correct, it must be built-in, no-overhead. Feed it to someone else if it takes half an hour only to set up.
- imtringued 4y agoI did that, then I switched to godot and the godot project is further along despite the fact that the site now needs to download 20MB (18MB is the engine itself). Who cares? The only thing that matters is that it works and that people don't have to install it on their computer. A game engine is a good fit for what I'm doing (simulation and 2D visualization) so why bother assembling it out of a dozen hand picked fragile JS libraries just to shave off seconds on something that will be used for tens of minutes once it is started up?
- itsuka 4y agoI wonder the legality aspect of hosting someone's else code as preview. If this is a problem, I think you can use a video preview like any other award websites. godly.website is one example that comes to mind. IIRC, they have responsive videos and good information density. I hope this comment is not taken as a criticism, which you have received a lot already in this thread. I myself use Next.js (and Cloudflare stack) in almost all of my projects and I feel very productive with it. Just throwing an idea here: since the viewer of your website may need to copy other website's design, it would be nice if you can save them a few clicks/keystrokes by providing a color palette. One thing I learned recently from creating a personal tools like yours (with additional types, elements, motion pattern, and tech stack) is that we can extract colors from any page easily using CSS Overview panel in Chromium Dev Tools. Lastly, I just want to congratulate you on shipping!
- satvikpendem 4y agoThat's a good idea about the color palette, I'll add that in there. Do you know of a way to automatically extract the palette or would you do it manually? Regarding the legality, I did look into it, it seems like iframing other websites should be legal based on what I read, but if anyone contacts me to take down their site, I'll do that.
- itsuka 4y ago> it seems like iframing other websites should be legal based on what I read I think embedding other websites in iframe may fall into a gray area. This is my reasoning: even though the target website can include X-Frame-Options: DENY in their header, a lot of them don't, and it opens their websites for abuse, whether intentional (from your POV, e.g. clickjacking), or unintentional (e.g. a DDOS attack on your website may also affect the target websites). Because of this, I have been careful not to embed cross-domain websites in iframe. The issue that I was trying to bring up is actually not about iframes, but rather, other website code and assets that you copied and hosted in /sites/ directory. As you know, websites and their assets (logo, font, etc) are copyrighted materials - so we can't (directly) use it without the owner's permission. I don't know if this usage would fall under Fair Use though. As previously mentioned, I'm not versed in legal stuff. > Do you know of a way to automatically extract the palette or would you do it manually? CSS Overview panel does the job. It groups colors by usage, such as by background and by text, and it also gives you the contrast level for each. I'm sure you can find other tools for extracting colors. Most recently, "HTML To Figma" by Builder.io is the one that gains a lot of hype. It basically converts any web page into figma layers that you can edit. From there, you can extract all of the design tokens, including colors. I don't know any tools that can automatically extract and label a color palette with 100% precision. If you care about accuracy, I think you still need to do a bit of curation / manual work.
- gidorah 4y agoI did something similar for accounting websites. Except I used Python/Selenium to screenshot at different screen sizes and wrote to a plain html file.
- Emigre_ 4y agoIt’s really cool that you did this. It’s like a personal exercise to develop a particular aspect of yourself, in this case ‘focus’. Did you know there is a similar challenge between comic-book creators called the ‘24h-comic challenge’? The idea is to produce a 24-pages-long comic book in 24 hours. Creators like Scott McCloud or Neil Gaiman have participated. https://en.m.wikipedia.org/wiki/24-hour_comic https://en.m.wikipedia.org/wiki/24-hour_comic
- satvikpendem 4y agoThanks, hadn't heard of the comic challenge but it's interesting, not surprising many creative industries have similar challenges. I also know of NaNoWriMo, National Novel Writing Month, where people write an entire novel in one month. I think time-boxing effort is a great idea in order to ship stuff, like you said.
- rpastuszak 4y agoWell done! As someone who teaches prototyping but then ends up spending 3 months on a “1-day indie game project” I think this is quite impressive! Here’s my approach in case you find it interesting: https://sonnet.io/posts/reactive-hole/ https://sonnet.io/posts/reactive-hole/
- BrandoElFollito 4y agoI am an amateur dev and used to look for the MOFD (most optimal framework of the day). I realized that I spent more time perfectionning my work than actually do the work. I settled for two languages for the back (go and python and a fixed nr of libs) and one framework for the front (quasar, vue3, vite), and PWA to have an "app" on desktop and mobile. This is heavy, not optimized, ebery problem looks like a nail to my only tool (a hammer). But I write mostly for myself and managed to write over an evening the app which would track chores at home for the kids, display it on the home dashboard and disconnect their phones until they are not done (just kidding for the last one, my children are way stronger than me and I do not take risks, and stay with the "because I said so"). I have many similar apps, some I throw away, some I use, some I open source. Perfectionism is painful.
- KronisLV 4y ago> I am an amateur dev and used to look for the MOFD (most optimal framework of the day). > I realized that I spent more time perfecting my work than actually do the work. > Perfectionism is painful. This mirrors my own experience, I actually wrote a bit more about it on my blog, albeit perhaps in the context of writing software that's actually maintainable "How boring or novel should your technology choices be": https://blog.kronis.dev/articles/how-boring-or-novel-should-your-technology-choices-be https://blog.kronis.dev/articles/how-boring-or-novel-should-... There are options out there that are kind of not very exciting, but have good documentation, tutorials to do most of the typical stuff, answers to most of the common problems and decent performance as well as the ability to scale. I also recently wrote a system to process millions of documents on a single node based on PostgreSQL, Java and MinIO as an exploratory project (to also explore things like database partitioning), it worked pretty well and I did that in a few evenings "Pidgeot: a system for millions of documents": https://blog.kronis.dev/tutorials/1-4-pidgeot-a-system-for-millions-of-documents-the-data https://blog.kronis.dev/tutorials/1-4-pidgeot-a-system-for-m... I guess at the end of the day you just have to pick something that works, maybe a bit on the boring side and stick with it as long as it's the right tool for the job.
- satvikpendem 4y ago
- RamblingCTO 4y agoLooks nice but almost took down my browser on an M2 macbook pro with 16gb of ram. Ok, sure, I have a lot of stuff running and what feels like a thousand tabs open, but that's something else.
- jefozabuss 4y agoA full scroll through is downloading 135MB+ currently, even though it's a quickly made site it's super wasteful imo. The suggested preview gifs (and loading on click) could be a major improvement.
- boplicity 4y agoDark Mode thought: As someone who uses an OLED screen, I want dark mode to feature true black. This makes a huge difference for me. I get quite annoyed with any dark mode that is mostly "dark grey" as opposed to just black. I want all of those dark pixels emitting no light at all. This is much easier on the eyes, and takes full advantages of the wonders of OLED. This is especially important for mobile, where many, many people now have OLED screens.
- satvikpendem 4y agoI use an OLED as well (an LG C1 48 inch TV as a monitor actually lol) so I made the background black as, like you, I think #000000 looks good on an OLED. However, it can look quite a bit harsher than softer colors such as on the Linear or Radix examples. It's okay if you're making a brutalist site like mine is (with bold, big text) but it doesn't really look that good for other site designs. All that being said, I use the browser extension Dark Reader to crank up backgrounds to #000000, but I think most people would be annoyed at pure black.
- philip1209 4y agoLove it! This might do well on Product Hunt. If you had a mailing list, I'd sign up to get notified about new dark modes you add in the future.
- jdthedisciple 4y agoVery inspiring! Site almost crashed my browser (it all went blank for a sec) but this is an awesome story - definitely bookmarking this as one of my goto-inspirations.
- mandeepj 4y agoGreat execution and appreciate the thought process. I’m sure many of us here, find it useful. > One tricky part was that many sites block iframes, so what I had to do was save the entire website into its constituent HTML, CSS, and JS, and I displayed that instead in the iframe. I’m sure you know it, those artifacts might get outdated soon. They don’t need to be synced in real-time or maybe never. Cloudflare threads (or something like that) can be used for updates, in case you plan to go that route. Please don’t stop here. It should go on.
- satvikpendem 4y agoThanks for your kind words. Could you please explain more about Cloudflare threads? I didn't see any reference on them when I googled it. Are you saying to periodically run a function that automatically saves the website locally and the iframe can point to the new local versions? If so, yeah I might do that in the future soon.
- mandeepj 4y ago> Could you please explain more about Cloudflare threads? I read about threads sometime back and knew it’s not workers; but I can’t find that reference. So, for now, Workers seems to be the best bet. > Are you saying to periodically run a function that automatically saves the website locally and the iframe can point to the new local versions? Yes! Sorry for the late response
- satvikpendem 4y agoThanks. I think I'll migrate over to images or videos instead of iframes actually, as my bandwidth is getting overloaded due to how heavy all the websites are, whereas I can optimize images and videos.
- mandeepj 4y ago> as my bandwidth is getting overloaded due to how heavy all the websites are, whereas I can optimize images and videos. how about using gifs instead?
- vldr 4y agoYou didn't build an app, you built a site, right? Or is there some CMS behind this?