Hacker News new | past | comments | ask | show | jobs | submit login
LeetCode but You Can Force People to Code in Light Mode (beatcode.dev)
120 points by weebao 73 days ago | hide | past | favorite | 105 comments



I must be in the extreme minority, I always prefer light themes.


For me my preference toward dark themes increased through the 2000s along with my need for syntax highlighting as I started writing more complex code. With light themes, syntax colors don’t “pop” nearly as well, giving me fewer visual anchors and making my eyes get lost in the code a lot more easily.

That said, I’m not fond of super dark or pure black-based themes and prefer those with a 75% gray background (with 100% being black) or thereabouts. With pure black themes the code pops too much and it feels like it’s all vying for my eyes’ attention at once.


I've also found that light themes have issues with syntax color "pop". I always make my own!


I changed my home office to my “luminarium” where I’m using about 700W of LED bulbs to get my lux to around 10,000. It’s a necessity that I use light mode, it’s impossible to see dark mode.

Also it effectively cured my SAD.


700 real watts or equivalent watts?


700 real watts of LED has got to be intense. Also your room would be very hot.


I routinely run 350 real watts, and go up to 1400 when I really need light. Helps with heating, but doesn't get all that hot.


1400 Watt of LEDs is the kind of lighting you'll find atop a tall pole in a sports stadium. That's ~200,000 lumen, or about 10x as much as you'd need to light a large room really brightly. If you put that next to a skylight, it would make the sun look dim. It's certainly not impossible, but that's a lot for a single point light source.

What are your rooms like? Do you live in a castle?


I have 2x SmallRig RC 350D [1] and Godox M600bi [2]. These are medium-spec videography lights that draw their rated power from the wall. Lux @ 3m is noticeably (10x) dimmer than the sun.

I have tripped my breaker when running the setup, so I run from two outlets on two breakers. For my current (quite large) room, I'd love to upgrade to the 5000W lights (Nanlux Evoke 5000B or the Aputure STORM XT52), but electrical wiring would be a hassle. For a standard room, I find 700W to be sufficient.

I also backed this project - https://www.indiegogo.com/projects/brighter-the-world-s-brig... - been following them since their Show HN.

[1] https://www.bhphotovideo.com/c/product/1729860-REG/smallrig_... [2] https://www.bhphotovideo.com/c/product/1715199-REG/godox_kno...


For reference, this is a 1200 watt stadium light: https://www.ledlightingsupply.com/led-outdoor-lights/led-flo...

So it's not unfair to say that you're off by a order of magnitude. For a single stand, 2 orders if counting all the stands.

1400 W is a lot by conventional room lighting standards, but not if your objective is recreating daylight indoors.


This is what a 20kW incandescent bulb looks like in a home/backyard: https://www.youtube.com/watch?v=LT5_-A0m8_U


Before I even click that link I'm going to assume it's photoninduction.

Edit: It was! That mad lad!


I can’t believe he did that in an enclosed space. “It’s like having a bonfire in the room” indeed.


The sun is really bright. My outdoor Hue sensor regularly reads 50k+ lux in sunlight. A room in my house with 100 watts of LEDs reads ~300 lux from the sensor on my dresser.


Yeah it’s truly astonishing how bright the sun is when you start trying to recreate it at home. But my room is brighter inside than an overcast winter day outside! That was my goal, and it’s substantially improved my mood. I’d do a write up but my strategy has been “keep buying lights until it feels bright enough and distribute them around the room”. I should probably get a real lux meter I’ve just been using my phone which seems a bit off.


700 watt space heaters seem pretty common. I’d expect the heat produced by 700 watts of LEDs to be just a tiny bit less than the space heaters (as some of the energy will sneak out the window, photons being sneaky fellows).


Real watts. I’m working on getting more. I only use it in the winter when I’d be running a space heater anyway. So I’m not wasting electricity I’m just making a useful byproduct.


My dad also did that to my house too, and I had to try to find a corner dark enough to see my editor in dark mode lol


As a real Stan for good indoor lighting, I would like to know more about your setup.


I’m still experimenting, but right now it’s 28 bulbs attached to my ceiling fan with some 7-way splitters (the ceiling fan is an old one that supports 4 100W bulbs), two big corn bulbs, one 100W and one 250W, I’m still trying to figure out the best way to mount these. Then I had my daughter paint some art and I framed it using LED light strips, I’m gonna put it on the wall.

I haven’t really figured out a good way to diffuse the 250w corn bulb, its blinding to look at and it’s absolutely massive. Maybe I could use ABS and 3D print a translucent shroud and mounting bracket for it.

I had another 100W corn bulb that didn’t use a fan and it burned out after about a year.

I’ll be honest right now I’m in a transition period of moving rooms so I’ll often just spend 30 minutes in there in the morning, although last year I spent 8 hours a day in there. It really helped me during the big snowstorm the Midwest US had recently. I just bought cheap 200W equivalent LED bulbs until I got to the full 28, because that was super easy, then I’ve started experimenting.

In winter time when the sun is shining directly into the window that’s still brighter, but that happened maybe a dozen times over the last 80 days, even with a south facing window. This winter was super dreary.

Sorry I’m rambling, but Maybe at some point I’ll worry about CRIs but this was mostly an experiment. It has definitely helped but if you like indoor lighting you probably already know that.


Its not rambling if its useful. I have some crazy led cob lights that look like street lights when they're on. I might try them indoors. I have spares for my outdoor ones.

I might comment wattage and lux if I can, couple days.


The idea of 28 bulbs hanging off a ceiling fan sounds hilarious. Good on you though for finding what works and getting it done.


We're in the same boat, my eyes actually start hurting when I look at a light-on-dark screen for more than a couple of seconds.

I'm just really glad that my web browser has a reader mode, or else there would be quite a few web sites (blogs etc.) that I could not read.


I get horrified looks from my dev team when they look at my screen, but I typically use light mode for work, and I find it easier to read by a long shot.

For dev work at home, I use darkmode, but I usually work in a less well-lit environment and for less time.


Exactly. Light mode for coding in the sun. Dark mode for late night hacking.


Yeah, I remember back when I was a cringy teenager and bought into all the propaganda about why darkmode was better for eyes and whatnot, so much stuff.. So I spent 15 years or so with darkmode, untile one day, i read somewhere that the evidence of darkmode being better was not just lacking, but that people read dark letters on a bright background faster and more accurately than the other way around.. Now this is the Internet, with a capital I so I won't back up that claim with any references, and it's not important whether anyone believes that or not, fact is, that day, I thought "hm" and I switched my editor back to light mode and thought "hm, this is fine too" and I kept it long enough that I discovered that I prefer it.. Now, my xterm, I do want white on black, but that's just something about how that bitmap font looks to my eyes, that makes me want it that way.

But honestly, I don't get what the big deal is with either preference, it's not a big deal really.. black or white.. it's fine!


I use light mode during the day and dark mode from dusk till dawn. I do this because I find it more comfortable, not because I'm told by someone or a study that it's better.


that's fair, the study didn't convince me it was better, it just prompted me to switch back to white, because, actually, I don't know, and then I found that _if_ it made any difference, it was probably positive, but, even though I sit at the screen from dusk till dawn, I find no difference in how pleasant light or dark mode it, it just makes so little difference to me that I don't care :)


I suffer from astigmatism and dark themes fatigue me a lot.


Same here, I think that's why I prefer light themes when developing. Although I like my terminals dark for some reason.


same, mate. i'm not sure why people question or consider my preference (that actually affects my situation) as an unusual situation. haven't they ever seen a blind with a stick? to be exaggerating.


WIIIIIIIITCH!

Just kidding ;D

I'm actually studying my students' color theme preferences for lecture slides and I'm seeing that while a majority do prefer dark mode, there is noticeable chunk that still prefer light mode. I think some of it may involve time of viewing, but that is another research question I haven't explored quite yet.


In the daytime I prefer light mode, and at night I prefer dark mode. I think it's somewhat odd to have a preference inconsistent with the time of day.


Indeed this is the way.

I also have variants of light and dark for different lighting conditions at night and day (particularly glare).


how long have you been coding? I felt the same in my younger days but discovered over the years that dark mode much more gentle on my eyes.


Not the author, but I’ve been coding since the 90s and also ended up switching between light and dark depending on the time of day. The trick is to also adjust screen brightness. With light background you can lower overall brightness. With dark background if you’re in a well lit room, you have to increase brightness to the point where bright words on the screen actually shine too strongly in relation to the dark background. So it actually feels gentler when the background is light but screen brightness is dimmer overall.


Over 10 years. I used to be dark mode all the time, but in recent years I feel light mode in daytime is much clearer and doesn't clash with the ambient light which forces my eyes to strain more in daylight.


I actually went back from dark to light! Feels pretty good


I find it doesn't matter to me. Dark mode means I'm on a server 9/10 vis a vis code; otherwise I'm in notepad++ which is light mode.

I wish the colors on notepad++ were a little darker, and someday I need to figure out why the stock gentoo color scheme looks the best to me, and try and recreate it elsewhere.


I think universally light when using a projector! But maybe nowadays it's remote or big LCDs...


Same here. I work in an office with lots of daylight and dark mode makes it actually very hard to see.

Also, light theme allows for more distinguishable colors.


I’m actually moving to an extreme because of the busy colors on the screen attracting distractions, high contrast white on windows with Color Filters on grayscale. It’s like reading a newspaper. Now I just need to increase the window frame borders for the touch screen and it looks like eink


In my opinion, dark themes are for when your monitor's brightness is set too high.


I always struggled with loving dark mode, but I usually keep my brightness as low as tolerable without straining, and your comment made me wonder if it's related I do like dark mode if I'm working in a super dark room though


That's exactly why. A lot of monitors don't go dim enough for darker environments, so we make them even dimmer by showing a mostly black picture.


I love how this went viral because of this thread lol. I do know some friends who prefer light mode too, so maybe an opposite effect of forcing your light-mode-fan opponent to code in dark mode? Dunno lol


You’re not alone. I do the same, but often I keep the text editor in dark mode but the rest of the system on light mode to help provide contrast.


Dark mode is difficult to read for me.


Basically recreated LeetCode on a $5/month VPS lol. It started as a class project but over 800 people joined so I kept refining it for 2 months. It supports running Python, Java, and C++ code (building a code runner is tough). Give it a try and let me know what you think!

The code is also open-source too at https://github.com/beatcode-official


In case it's your own project, I believe the convention is to prefix the title with "Show HN:".


Sorry I'm new here seems like I can only edit the title within 2 hours of posting. Thanks lots for telling me!


Neetcode uses/used judge0 for code execution but it might be overkill

https://github.com/judge0/judge0


Yea I knew about that but I wanted to learn how to build one my own :D


What were the challenges you encountered / tackled with creating a code runner?

Cool project!


Thanks! Creating a template for inserting the code would be one. Java has this type erasure thing where the types only appear after compilation so tweaking it around was hard. Spinning up the containers for each submission is slow but it ensures every submission is isolated.


have a look at this "https://github.com/INGInious/containers" - open-source platform for secure and automated code assessment


"Runtime analysis? How is that possible?" I thought...

https://github.com/beatcode-official/server/blob/42169027dda...


More and more I find code like this. When you dig into an interesting aspect it's just an llm call. I haven't decided yet if it's good or bad. But it does seem to work a most of the time.

The problem is that we're used to code that works all the time or none of the time. With LLMs you can't know if it's right for sure and it's really hard to check.


Lmao. They need to call that out so the users know not to believe it


Clarifying that it’s the output of an LLM is responsible.

Though LLMs are really good at anything related to plain LeetCode problems. There has been so much written about the standard LeetCode problems across so many websites that it’s all heavily represented in training sets.


Yeah sorry :) At first I tried to do a stress test, then plot a curve and try to find the closest runtime curve to that curve but it didn't work most of the time ;-;


lmao, halting problem solved with one weird trick!


I just wanted to mention another cool alternative

https://neetcode.io/

The author has a YouTube channel where he actually solves a lot of the problems step by step. Really cool as a learning resource


He was actually going through a depression and drug addiction, and then he started making YouTube videos where he solved leetcode problems and eventually he got a job at Google and then he quit that job.


Getting a job at Google is a superficial achievement that won’t fix any self esteem issues.


That may be true for a lot of people. But no matter how much you hate a specific company this just isn't true for most people.

For me personally it would be an immense boost to morale. Getting any offer would boost morale but a top tier tech company is the Pinnacle.


That seems a bit silly to call an achievement that pays you money superficial. Also no matter where you are in life, it is feels good to reach goals you aspire to.


Getting a job at a major company gave me the self esteem to realize I could do it myself. It's a boost even if you quit.


I'm actually planning to put all neetcode videos in my practice mode. Awesome stuff ;D


I use light mode when it's light, and dark mode when it's dark. Anything else results in either cooked retinas or excessive squinting.

It baffles me that anyone could be so wedded to their theme that they would use dark at midday in a well-lit office or vice versa.


This became obvious to me when switching between my dark editor and the bright website I was developing. It was pointless to have to adjust the screen brightness at every switch.

Once theme switching became part of the OS, I rejoiced.

It still pisses me off when I reach a website that doesn't follow my scheme setting but offers a manual toggle.


Dark Reader extension is my weapon of choice for this, for sites that don't offer a dark mode. I've set it up to follow the system theme, all my apps are set the same, so when I flick the system theme (or it does so on sunset), everything changes. It's the little things in life.


Imma add an ability that flashes rgb in your editor then. Thanks for the suggestion :D


I "grew up" coding in bog-standard light mode decades ago, and I guess it just stayed with me? Still do it that way.

EDIT: If you're gonna be devious, just force people to code with blue font over black background.


I may be evil but I have my standards sir... (Why not just random rgb flashes?)


In my universe, the only permitted background colors for programming editors are NeXT white, SGI pastel yellow, and Turbo Pascal blue.


In my universe, the only permitted background is pitch terminal black


> but You Can Force People to Code in Light Mode

As I've aged my preferences have moved away from dark themes to light themes.

I used to have everything in dark mode: terminal, IDE, sublime text, use Dark Reader Chrome extension.

But I can't see shit anymore. I need light!


It might mitigate some of your issues by using themes that are anthracite / charcoal / deep gray instead of pure OLED black. Due to the way screen technology and bad eyes work you often get slight halo-ing or double vision with white text on pure blacks.

Also definitely stay away from Solarized. The contrasts on Solarized get muddled really quickly if you run your screen at low backlight intensity and especially if you use a night light blue filter / orange overlay.

Hope it helps!


Dark editor themes has always been one of the most laughable of orthodoxies in tech. Contrast is key for reducing eye strain, especially for extended sessions. And Solarized doesn’t have nearly enough.

(I suspect a decent chunk of Solarized’s popularity came from the fact it was popular, rather than the “science”-based facade it marketed itself as.)


Oh man, I always thought it was some kind of joke theme or something like holiday themes that people only put on for a lark. I didn't realize people actually used it as a daily driver theme. How is that even possible? Even in my 20s I thought it was terrible.


Hmm there're a lot of light mode fans here. I'll probably need to pivot to some color inverse scheme instead


It’s a fun idea but the ability gimmick makes me not interested. I imagine it will also quickly be overrun by AI copy/pasters.


Yea true not sure how to prevent that so ig this is just a project for now


Kinda insane how this post I made for my project got viral. Got a tons of feedbacks and I just want to thank everyone here for checking it out. Really means a lot for a student trying to build cool stuff :)


I'm just here to praise the "Login as guest". Thank you !!


You're very welcome :)


just tried to play a round, the answer checker failed because it compares the results with `result == eval(expected)`, where `expected` is `"true"`, which is not a thing in Python.


Also there is an issue where string comparison doesn't seem to work.

Unfortunately the site is unplayable currently. But it has a lot of potential, it's similar to binarysearch.io which all my friends loved: https://news.ycombinator.com/item?id=22164212


Thanks for the report, I just fixed it!


This seems like a fun thing, could it be used for a hackathon type style of event with say group participants up to ~100? I'd love to see some hackathons.


That'll be awesome. I'm also planning a relay style team mode where each person can code for 5 minutes or so and the next will jump in :D


The "freezio" ability seems more like a power up, than a roadblock. Imagine people actually read what they wrote.


Lmao true


I don't see where it says that.

Regardless, is that forcing an inverse color scheme on someone supposed to prove something valuable?


It's just an ability to annoy people. I also had another one where you can rick roll them in the background :)


Ha, OK. I've been annoyed enough through what I will call the Color-Scheme Stupidity years, between the time that Microsoft removed the color-scheme editor from Windows and everyone finally realized that reading black text on the surface of a light bulb all day is stupid.

They had it right in the '80s (except the Mac): white text on a dark-blue background FTW. And through the '90s and probably into the 2000s, Word even had a specific checkbox option for this scheme: "Blue background, white text."


A bunch of wimps for not going back to actual VT220 green phosphor terminals. Lol.


Going for "deletio" too many times causes the JS to go into a loop.

Still, fun.


Huh interesting I'll try to fix that. Thanks lots!


The magic elements are a fun idea!


Thanks!


Solarized Light 4 Life lol

Dark mode always strained my eyes like crazy. White bg is too much. Solarized Light works best for me.


Just changing the white background into pale yellowish and leaving black text as it is for better contrast works much better to me.


Same here, spent many years in dark mode but solarized light is perfect and have been happily using it for the last five years. Thank goodness my current companies custom IDE supports it.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: