News for hackers. Stuff that matters.

Sakes

Re:Animating CSS Grid on Friday January 18, 2019 @10:40AM (#18940000)
When done correctly and performantly, animations in web apps allow for a user experience that is closer to that of native apps.
Re:Animating CSS Grid on Friday January 18, 2019 @10:38AM (#18939984)
If available in all major browsers, I'd use it for collapsable horizontal/vertical navigation panes/bars.
Re:Learn React by building a web app on Tuesday April 10, 2018 @03:47PM (#16804582)
Good advice, I'll set it up. The problem I ran into with react-router-redux was the requirement of using location to provide the value for a key on CSSTransition. I had to use this implementation to solve the problem of the missing exit animation. https://reacttraining.com/react-router/web/example/animated-...

This uncovered a new problem for nested animations. The high-level page transition animation occurs even when the url root does not change. So I need to be able to ignore animations on Route components located high in the VirtualDOM, and apply animations (sometimes different animations) on Route components located further down.

Maybe you already know of an elegant solution to solve this problem? If so let me know! In the meantime, I'll keep bang'n on this.

Edit:

Concerning giving an indication that a panel has been opened, I'd just use CSSTransition wrapped around whatever element that is going to be introduced to show that it has been opened. Then define your 'enter' animation in css.

If that seems like overkill, and you can't use did mount to determine if the animation should be applied, then I'd just add a css className to your element to introduce some animation defined in CSS.

Obviously, I may be misunderstanding your use cases here. The above are just knee-jerk thoughts on it.

Re:Learn React by building a web app on Tuesday April 10, 2018 @03:25PM (#16804348)
Sure! Will do. Honestly, I was just building it for myself, so no mailing list. But I'd be excited to see how you like it.

The problem I'm aiming to solve is nested route animations, and allowing for different animations to be applied depending upon the previous route in history.

Re:Learn React by building a web app on Tuesday April 10, 2018 @03:07PM (#16804163)
I'm literally working on a lib to solve this right now, specifically to be used with react-router. If you want I can contact you when finished and you can give it a whirl.

Implementation will look something like <TransitionGroupRoutes><CSSTransitionRoute path="..."/><CSSTransitionRoute path="..."/></TransitionGroupRoutes>

Re:Text Is Keeping Kids from Coding on Monday August 14, 2017 @11:41AM (#15009462)
I agree. Coding is not fun because writing a command that a machine can compute is inherently enjoyable. Coding is fun because you can manipulate a machine and build something you want that didn't exist before.

I downloaded GameSalad one weekend. My 6-year-old son and I ran through the tutorial which took about an hour. Part way through he got distracted. He spent about 20 minutes changing movement speed properties, object colors, & sizes. I was happy to see him get engaged and just start experimenting. While he did not learn how to code, the seed was planted that creating mobile games is something within his reach.

Re:Hard Truths about Programming on Thursday July 06, 2017 @06:23PM (#14714444)
You have to take into account a person's expectations of themselves as well as the scope of what they are trying to learn. If your expectations are overly ambitious, it's hard. If you are trying to learn to code some narrowly scoped solution, then its simple.
Re:Ask HN: What happened to the ORM? on Thursday June 29, 2017 @06:07AM (#14662024)
There are a number of things you can do to improve performance of queries generated by ORMs.

* Make sure you are indexing properly

* limit the number of items returned by introducing paging

* use lazy loading where applicable

I'm sure there are other techniques, but these are my gotos.

Re:Show HN: Get Paid to Build Your Next Side Project on Wednesday June 14, 2017 @11:15AM (#14553334)
It appears to me that this is a tool to identify a market / need that is not being met.

There are people who simply want a product/service, no desire for ownership. They post what they'd be will to pay for it, as a customer, and you decide if it is worth your time to build it.

Anyone? Am I understanding this correctly?

Re:Welcome, ACLU on Tuesday January 31, 2017 @11:26AM (#13531953)
As far as I have observed, the only thing people consistently respond to is pain. This can be done through the introduction / removal / or threat of pain. It'd be nice if we all empathized more with other people's pain, but that doesn't appear to be the culture that we live in. Maybe there are cultures that do elsewhere, but I am unaware of them.

But I do have a question for you, when the interests of those with influence align with the ignored, why would your initial reaction be a negative one?

Re:Ask HN: What inspires you to persevere through adversity? on Sunday January 22, 2017 @12:02PM (#13455964)
For me, it's fear, fear of being dependent upon an economic/labor system that does not favor labor. If you are not an owner, and make a living selling your time, you are threatened by both outsourcing and automation.

As a programmer / engineer / whatever label you want to give, it is a little easier for us to adjust to changing labor conditions because our careers, as long as not overly specialized, require constant learning.

But I'd prefer not to live a life competing with people all over the globe, or being blindsided by some tech that can execute a majority of my responsibilities as an employee.

Re:Software Developers Should Have Sysadmin Experience on Monday January 09, 2017 @08:24AM (#13356134)
"This might be controversial, but I don't think you get to be a half decent developer without being a reasonable sysadmin."

Couldn't this argument be applied to any developer for any discipline/speciality?

Sure, more knowledge/context is always better if reasonable to attain, but my experience suggests that your above concerns could also be addressed via team organization rather than expecting all developers to know all things.

Re:Why isn't there a Google for the law? on Thursday January 05, 2017 @10:56AM (#13328108)
You were originally correct. They currently have one book specific to California.

They do have federal books as well that apply nation wide, but as most lawyers are highly specialized, that may not apply to what you do?

Re:Why isn't there a Google for the law? on Tuesday January 03, 2017 @02:20PM (#13312129)
I'll reach out to them. I used to do some contract coding for them. They may have more books for Cali that haven't made it to the marketing site.
Re:Why isn't there a Google for the law? on Monday January 02, 2017 @07:04PM (#13305558)
If you are in either Texas or California check out https://www.oconnors.com/ (formerly Jones McClure Publishing)

They have an online reader for all their legal commentary books. They've invested heavily in search. It is pretty fantastic.

Down vote instead of engaging in a discussion? Here's another comment for you to down vote.
Definitely a reasonable critique. What I didn't originally realize is that medium is more than blogging software. It promotes community among writers. You can also create an account and just follow people. (Yes, I know this is obvious to most)

I'm of the opinion that when you're developing an app that will be used regularly, it is justifiable to have an expensive initial load time, provided it allows for a better experience on following uses.

I understand there are purists out there that disagree with this, but... "Yeah, well, that's just like... their opinion man". There are always trade offs. You just have to make tradeoff decisions based upon the needs of your primary user base.

Re:We Have a Bad News Problem, Not a Fake News Problem on Saturday November 19, 2016 @11:46AM (#12994219)
I suspect he didn't want the main point of the article being lost in partisan internet arguments. If he said Fox was bad news, the conservatives would lose it. If he said MSNBC was bad news the liberals would lose it.

I assume Snopes will approach it article by article, episode segment by episode segment, and let the quality of a given source be revealed over time.

Re:LinkedIn is now officially blocked in Russia on Thursday November 17, 2016 @05:26PM (#12982327)
> I think the only thing toxic here is how you write and view other humans and your fellow countrymen as inferior beings.

Eh, might be toxic. Might be a natural human response to seeing the majority of his countrymen accept propaganda without question. You don't know this guy. For me his comment read more like a frustrated individual than someone that thinks he is superior.

I imagine similar trends can be found in many countries, including the US. The desire to belong is strong, and sometimes it's in our best interest to think less and cheer more.

Re:FBI Statement on Clinton Email System on Tuesday July 05, 2016 @12:06PM (#12037378)
While I'm not happy about this outcome, at least it is consistent with the way that I assume our government/legal system operates.
No home is impenetrable so we shouldn't expect anything there to be private either.
Re:'Be Yourself' is terrible advice on Sunday June 05, 2016 @02:31PM (#11842342)
Not you, just some general person who believes "self monitoring" is inherently a wrong thing to do.

I probably should have used "one" instead of "you" in my above comment. My apologies. Will modify it.

Re:'Be Yourself' is terrible advice on Sunday June 05, 2016 @01:40PM (#11842078)
The way I see it, if one believes they should always be authentic, then they probably never take in to consideration how their thoughts/actions might affect others or the goals of a group. Hey, they're just being honest.

But, if one decides to potentially self sensor by taking the time to consider how their current thoughts or desired actions might affect others and they conclude they will have a negative outcome resulting in them not expressing or acting on them... Well, they may have just made a decision to be inauthentic. But they did so out of consideration and empathy for others. And if their authentic self does care for others, well maybe they are still being authentic.

If one doesn't care about others, and doesn't have empathy, well then they sound like an asshole to me. To them I say continue on spewing filterless thoughts... asshole. :)

edited for clarity.

Re:What to do with billions of useless humans? on Tuesday May 17, 2016 @06:11PM (#11717955)
I think eventually poetry and music would be created by AI. The question is what happens when AI is better than humans at everything.
Re:What to do with billions of useless humans? on Tuesday May 17, 2016 @06:09PM (#11717934)
I've honestly been curious about this for years. Currently, at least in America, we have a culture where if you are not meeting your financial expectations it is your fault. So if you find yourself in an industry that has been outsourced or replaced by technology, you simply need to retool. Ignoring specifics, this is typically sufficient to satisfy concerns of people that are not directly affected.

So, what happens when retooling isn't even an option? Utopia for some, utopia for all? I just can't seem to make any sense of it, but given the lack of empathy in the current climate for people labeled as other, I would suspect the former.

Ask HN: What lib/frameworks are you in love with?

As developers we use many many tools, and every now and then one gets put in the tool box that we just love. It feels intuitive to use and is rarely a source of confusion or requires a deeper understanding to resolve some bug in your app. I haven't fallen in love for a while, so I'd like to know if you all have and with what.What do you have in your tool box that you have fallen in love with?

( Read More... | 2 comments | on HN )
Re:Flexbox Froggy: A game for learning CSS flexbox on Tuesday December 01, 2015 @06:17PM (#10659648)
haha, yup, you'd have to modify 'style' attribute in the new level definition. I didn't test but i'm assuming it determines the position of the lily pads.

You can reference his levels here when trying to create your own.

https://github.com/thomaspark/flexboxfroggy/blob/gh-pages/le...

Re:Flexbox Froggy: A game for learning CSS flexbox on Tuesday December 01, 2015 @04:44PM (#10659044)
His code is pretty damn awesome. Open the site in chrome. Open web inspector.

Paste this into the console:

levels.push({ name: 'super secret-1', instructions: 'This is a secret level you get no instructions.', board: 'rggggyyyyy', style: {'flex-direction': 'column-reverse', 'flex-wrap': 'wrap-reverse', 'align-content': 'space-between', 'justify-content': 'center'}, before: "#pond {\n display: flex;\n", after: "}", });

Proceed to the secret 25th level! You can create your own levels, and make a pull request to his git repository if you really want to add some interesting practice levels. Just modify levels.js.

Older »