Hacker News new | past | comments | ask | show | jobs | submit | bussyfumes's comments login

Just had a script today that fires in 2 contexts and ran into an error where the element I attach a handler to doesn't exist in one of the contexts which breaks JS on the page. Since I already had jQuery as a dependency in the project, in the moment it felt easier to replace the querySelector call with jQuery, which I did, instead of checking the querySelect result so I second this, the 'fire and forget' part still holds up very well even though the tree traversal pain points have mostly been solved by browsers.

  Location: Ukraine (GMT+3)
  Remote: Yup
  Willing to relocate: Maybe in the future
  Technologies: JS (Node, Vue, etc), PHP, WordPress, SQL, Git and everything that's related.
  Résumé/CV: On demand.
  Email: bussyfumes@protonmail.com
Looking for long-term employment or short-term gigs, got over 6 consecutive years of working in different teams and plenty of experience freelancing. I love what I do and enjoy being able to make a positive impact.


Don't discard the juniors, maybe ask them to process your prompts for you. That'll give you some space.

I feel the opposite: I had a great experience asking GPT-4 to do some tasks for me and have been feeling like I'm missing out ever since by not using it more often.

However, I'm wary of posting work-related code into it so I either have to come up with similar examples, which is time-consuming or ask it conceptual questions for which I haven't been able to make it much helpful. Sometimes I even noticed that a conversation with a colleague produced a much better result and it wasn't even something very specific to the project. So yeah, I feel like it's a great tool but I'm having a hard time using it productively. It definitely feels like being creative with your prompts is an important part of getting value out of it.


> Don't discard the juniors, maybe ask them to process your prompts for you. That'll give you some space.

GPT can give incorrect, bad, or non-functional code. A senior engineer that reviews GPT responses will (hopefully) spot that and rectify it right away. Junior engineers can end up being less productive and not learn a lot when encountering this.


> I'm wary of posting work-related code into it

I'm always curious when I see this. Is it about potential IP in the code? References to clients in the code? Secrets?

In my last job they were worried about it too, but decided the cons outweighed the pros. Some of our code was client-specific (CanvaMapper etc.), but we would remove brand names and then go for it.


  Location: Ukraine (GMT+3)
  Remote: Yes
  Willing to relocate: Not at the moment, but maybe in the future
  Technologies: Everything JS: Vue, Node, TypeScript, etc. A bit of PHP and -- I'm not proud of that -- WordPress
  GitHub: https://github.com/kiryhas (not what I use for work but not empty either)
  Email: bussyfumes [at] protonmail.com
I'm a developer with 5+ yoe and I like making stuff work. My most recent experience involves lots of Vue for a live support application (WebRTC, VoIP, SIP though I mostly beat around the bush of all of that complex logic with my UI work). Before that I helped launch a SAAS (Vue + Node, payments and whatnot). I started as a support engineer for a digital product during my uni years so support applications have a special place in my heart. I feel the most capable working on them being able to provide some insights into the processes though I'm always open for learning new stuff. HMU for whatever it is that you might need, I'll be happy to talk with anyone :)


It's a shame that ratings provide so much leverage over employees.

A business I worked for sold their software items on a platform that used to do rating removal when the review didn't provide any context but eventually either bad rep for doing that caught up to them or the scale grew so much that they could no longer afford going through each case and they changed their policies. People would give bad ratings for the worst reasons:

1. They need a refund but the reason is along the lines of "I thought I was buying a different item". They can't ask their bank to do that because then they'll be banned on the platform. If the business provides a refund, then it takes a loss by refunding the part of the price that goes to the platform.

2. They haven't been able to figure out some very basic functionality and they can't even tell you what exactly went wrong. When you try to help them, they either never respond or you help them figure it out and then they don't change their rating.

3. They demand you customize the item to have functionality that it does not have or show it its marketing, you turn them down and suddenly your item is the worst on the market.

Of course there were constructive bad ratings and I'm not saying that the business was selling the cure for cancer, just providing my perspective. It's a tough world out there :)


I've setup HA so that I can turn on/off a couple of WLED smart lights and I found the UX of the dashboard to be a bit confusing.

After setting up a HomeKit Bridge integration, you are given a QR code to connect from the Home app. The code appears in the Notifications tab. I missed the code at first so the Notifications tab was empty and I thought that there should be a button to issue another one? After looking it up online, apparently the way to go is: delete the integration, create it again and be more careful with the Notifications tab.

Then if I want another person in the house to be able to control the lights from their device, I can't show them the code. This makes me wonder whether the HomeKit Bridge supports only one connection or if I just have to screenshot the QR code? It can't be that bad, right?

Other than that, a great piece of software. When I got the smart lights it bummed me out that I couldn't control them with Home and had to use some third-party app to do it so eventually discovering HA significantly improved my experience.


HomeKit can pair only once, to pair it another time it needs to be unpaired first; a design choice unrelated to HA. But you can “share” your home in the Home app. That will add additional “controllers” to those devices (HA being the device here).


Thank you, I thought so. It'd still be nice if they could print it somewhere because that was my first impression so I assume other people not familiar with HA will run into it as well.

Regarding sharing, I tried it, but it says "A home hub is required to add or remove accessories, scenes or people". I looked it up and apparently you were able to use an iPad as the home hub which you'd share access to, but since a certain version of iPadOS/iOS it can only be either an Apple TV or a Home Pod. I think Apple is focusing on being able to access your home setup anywhere so it requires a device that is supposed to stay at home all the time. Still a shame because it hinders offline-first setups like mine.


Mind you, HomeKit really is offline-first. The home hub does operate as the internet bridge, but on your local network you don’t need internet to operate your home.


That’s clever on the scammers' part. I wonder why so many universities have public uploads that are not excluded in the robots file.


Universities probably want lots of stuff to be easily discoverable.


When I was a student there was this power-of-two game on my friend's iPhone that I was literally addicted to. I didn't have an iPhone and eventually the game even disappeared from the AppStore. I missed it very much and my friends jokingly mentioned building a copy just for me. They never got around to it but at some point I thought "maybe I should give it a try?". So I gave it a try with no game dev knowledge and the second iteration turned out just fine for my needs: https://kiryhas.github.io/memechain/

I've considered rewriting it to make the code better many times but every time I sit down to do that I think to myself "it works just fine, why touch it" and leave this idea for a while :)

BTW the idea of the game is to combine cubes with the same number and color until there are only 4 left.


Very very nice!

2c of feedback - I'd love to have an unlimited undo to be able to backtrack and try different paths woth the same seed; sometimes the game doesn't end even if there are no moves left; and related to that it won't hurt to have a "hint" option to show a possible move.

Ps. Also the 2048 game was a blatant rip of "Threes", which would've been fine had the 2k guy not decided to monetize it.


Glad you enjoyed!

Thank you for your feedback. The "Back" button allows you to go back to the initial state of the game so I'm not sure as to how I'd make it unlimited. Could you please elaborate? I'll consider adding a hint, just have to come up with the animation.

Never heard about the Threes game, that's very interesting. When 2048 went viral I remember it being promoted as a learning exercise from some book a student did while learning JavaScript.


The "Back" button seems to be doing exactly what I was after with the Undo suggestion. Not sure how I missed it!

I must also add that the game is bloody awesome. Been playing it daily, now a part of the daily routine. Thanks for making and sharing it!


Thank you for your game, kind stranger, I've just wasted my day.


Only a day? This has been my go-to time killer for the last 5 years!

On a serious note, you're welcome, glad you enjoyed! :)


Hey man, I was yesterday until 3am w/your game and one hour today morning (had to stop to resume my life:) So addictive!


me at 10pm: this comment is exagerated but let's have a look... me at 2am: can't go to sleep until I make a new highscore


Neat little game! I don't like that you can lift cubes to see what's hidden, ruins the fun for my personal tastes as it becomes tedious.


Do you want a bug report? The lowest row doesn't fit into width of my phone's Chrome. I can only see few millimeters of the rightmost and leftmost cubies. Pinch zoom seems disabled so I cannot adjust. Tried switching to PC mode, but everything became too tiny. Rotating the phone also doesn't help. So for me it's unplayable.


Thank you, I'm aware that it sometimes looks off on certain Android phones, however I haven't had a case where it is unplayable. Could you tell me your phone model, what size/resolution is the screen?

I can't promise a speedy resolution since I don't have an Android but I'll definitely look into it when I get a chance. You can share your details here, send them to me by email or open an issue in the repo.


Huawei y8p, Android 10, 2400x1080, Chromium 88. Hope this helps.


posted here because I couldn't find the repository. I was looking here https://github.com/memechain


android SDK includes software emulation of phones


That's really addicting! :D

If this is mobile responsive I will probably use it a lot.

EDIT: Works flawlessly on my phone. Wonder if I can host it locally on my Android, so that I don't even need an internet connection...


I've never had big hopes for the project but I feel incredibly happy that you like it!

The original I played on my friend's phone was just that -- a phone game, so making sure it works on my phone was a priority :)

I don't have an Android but last time I tested it was playable even though the cubes were bigger than I'd like them to be on some screens.

I've made an offline version for myself in the past to play while traveling by train. Copying the contents of the .js and .css file into the HTML file into <script> and <style> tags was enough. I wonder if I can make it easier for other people like you by storing it somewhere on git...

P.S. Here's the source if you want to create an offline-first version yourself: https://github.com/Kiryhas/memechain


Yeah your game just scratches an itch I had for a long time. Mobile games are filled with ads and in-app purchases and I never found a simple game I could play and enjoy while waiting for public transport. Want to fully clear a seed now, haven't gotten that far yet ;)

Ahh, a single .html would probably work, too, sounds way easier!

I downloaded Termux, installed git and python3 and now your game is running locally on my phone with "python3 -m http.server --bind 127.0.0.1 9000" :)


Seeds are absolutely random and some of them can't be solved. I've had people complain about it but I consider it to be another aspect of the challenge of this game because there are cues you can notice that tell you if it's not possible to solve it.

Yeah, you went the extra mile spinning up a local server :)

If the trip you're taking is not a long one, you can just make sure to load the page while you still have reception. The game doesn't make any AJAX requests or load any resources after that and prevents the default 'pull-to-refresh' gesture so if you don't refresh the page accidentally, it'll stay available.


It's a difficult challenge I must say. Played about a dozen games now, furthest I've gotten is 4280 points. Have you ever cleared a full seed?

Yeah I looked at the files to see if you make any external requests. I guess I just found it entertaining that there's a web-game running locally on my phone :)


Wow, that's funny, that's my high score too. I guess there's a limited amount of possibilities, so it's probably not that unlikely. Seed was 5209605, if anyone wants to try it.


Finally got it! Seed is 5905480. Tried your seed but wasn't able to clear it :)


Yeah, I've cleared it many times. Sometimes no matter how skilled you are luck is not on your side :)

Maybe the game could benefit from a mode that verifies if a seed is solvable but I haven't gotten past it being just an idea.


Thank you for a good and very playable game.

It took me several tries with many different seeds, but I made it at last. 8000 points on seed 5706121. I like the simple but cool rotating cubes at the end.

I also like the non-minimized source code. It makes it instantly discoverable without having to find your repository (https://github.com/Kiryhas/memechain).

Looks like you did it without any external libraries which is cool! It looks clean and readable, and proves that developers don't need to download huge dependencies to create these types of games.

I have one minor suggestion. It would be great if you made the highlight a bit clearer when you are hovering over a matching cube. Sometimes it can ba a bit difficult to hit the correct spot. Maybe you could highlight the hovering cube as well in addition to the outline?


Thank you for your feedback and kind words!

Your suggestion makes a lot of sense, I think I'll add 0.5 transparency to the cube the player is dragging when it can be combined with the cube under it. It's late so I'll do that tomorrow, stay tuned :)


So it's been two days, I've played it a lot since then and cleared it twice. If feels soooo good to clear it because it's rare (for me).

Looking forward to the update ;D


Sorry for the delay, I've been a bit busy recently.

I've just adjusted the highlighting of the cubes, give it a look. For feedback you can contact me here, by email or open an issue on GH. Hope you enjoy!


Works great. Thanks


It definitely would benefit from that, people like to have success. (And know who they can blame in case of failure)

The easiest solution is probably brute force, have it try all the potential moves and see if it solves the game and if it does, make it a valid seed. Can be pregenerated, but should be doable in real time, also from a smartphone.

Also, I think I was just blocked from my first clearing, because I could not access all blocks.

Rotating the view and angle would be quite nice, but depending on your implementation, not trivial.

Maybe I implement it with babylonjs or threejs these days, it is a fun game.


Thank you for your feedback!

Personally I am not sure if I like winning more than just combining the cubes together and moving onto the next seed if it can't solve the current one :)

Pre-generating seeds is a valid solution but since I don't want the game to make any network requests I don't think it would work for me. Brute forcing it makes me worried if it'd drain the battery.

I think I would rather add an opt-in (like a checkbox) option to make the game check fields for certain patterns that tell if a seed can't be solved and keep generating until there's a seed that passes that check. I think that way the game would still give you the occasional seed that can't be solved but statistically your chances would go up.

Regarding rotating the view, that would make it a different game and I'd like to keep it as it is. However, that sounds like it could be fun so please send me a link if you end up creating such a version! :)


Now I am interested to give it a try, because I really don't think brute forcing the solution would drain the battery. Likely it would be neglectible, compared to the power needed by the rendering.

Because there is a finite and small amount of legal steps, so it should not need too many iterations.

That is of course, if you only brute force the raw game logic. Simulating the steps with the UI would definitely drain the battery ;)

And yeah, if I get around to redo it in true 3D, I send you a link. I think if done right, it provides the same experience, just a bit more overview.


Thanks. I’ve just wasted 2 hours.

Loved the game.

To make it generate winnable games just start from a solution and keep expanding it until you get to the initial game state.


Glad you enjoyed!

Could you elaborate on 'start from a solution and keep expanding it'? I thought of it more like checking the field for certain patterns that tell if it can't be solved and generating fields until one passes that check.


Start with 4 different color cubes, each with the value of 128.

Then just keep splitting them until you have a full the game. You'll need some intelligence in deciding which cubes to split and where to stack the split cube.

But if you reach a state where you can't split anymore you can must backtrack and try again.


Yeah, makes sense, I'll consider it, thank you!


> Mobile games are filled with ads and in-app purchases and I never found a simple game I could play and enjoy while waiting for public transport.

I bought Threes for $3 in 2014, and I still play it for hours each day -- on the subway, while waiting at restaurants, while watching TV, wherever.

A lot of people play 2048 because it's free, but it's not nearly as polished.


Tried Threes yesterday. Realy cute game but for some reason these kinds of games don't really hook me(Threes and 2048). But thanks for the suggestion!


Very cool game! Are all seeds solvable?


Happy to know you like it!

No, some seeds can't be solved and the game doesn't verify them.


Very fun game :)


4000pts even and I'm done for the day

Fun!


It seems like they're getting what they asked for, people are posting a bunch of bugs. My personal pain point was when I figured out that Safari supports only a subset of the Date format standard (RFC which is a part of an ISO or something like that, basically there are some dates that only Safari can't parse). Now it's up to them to live up to the purpose of the thread, if it means anything.


That’s a bug worth reporting to them on Twitter! Which dates, incidentally?


I no longer have access to send you the exact dates, but it was along the lines of what you can see here: https://stackoverflow.com/questions/63464398/new-date-return...

I just tried it in my Safari and it seems to give you an "Invalid Date" which it doesn't in Chrome.

Not sure if it's a bug, maybe a design choice. Anyway, in my case I received dates from a backend and was supposed to visualize a chart with them and some supplementary data, so I had to parse them and at some point we learned that the chart was broken for users in Safari because they'd get "Invalid Date" after parsing.


Dates are weird in JS/browsers so I wouldn't be at all surprised if some browser was strictly adhering to a standard, and the other browser... also strictly adhering to a standard, but a different one. Or both being lax. Or one of them being lax. Or...

Browsers are a mess, frankly :)


BTW here’s a surprise I had to learn at some point: strings in JS are UTF-16. Keep that in mind if you want to use the console to follow this great article, you’ll get the surrogate pair for the emoji instead.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: