Hacker Newsnew | past | comments | ask | show | jobs | submit | more kipple's commentslogin

> TypeScript has a steep learning curve

Does TS have a steep learning curve, or just a steep config curve? I personally feel that once a project has TS up & running, the actual use of it can be straightforward. Inference is so good these days, you shouldn't see many actual types at all in your code.

Have I just been using it too long, and I've forgotten the initial pain?


TypeScript is a great example of "low floor, high ceiling" (a phrase used by Seymour Papert to describe LOGO). It's easy for beginners to get started (low floor) since their JS code works as is. They can then learn and apply increasingly sophisticated features over time (high ceiling).


I'd say it depends on your JavaScript experience prior to learning TS. It will be easier for some than others. I don't think it's fair to assume that most people will find it straightforward.


> About 10 years ago we had a similar problem with jQuery. Often you would go to Stack Overflow to find the answer to a JavaScript problem you were having only to find the answer was given in jQuery.

I don't understand this argument. TypeScript is just JS + type annotations — you should be able to boil away any fluff and be left with functioning JS. Whereas jQuery has actual runtime logic that would need to be reworked if you wanted a $-free solution.

The author goes on to say:

> This was even worse when the question was along the lines of “How do you do (jQuery thing) in JavaScript?”.

When would anyone ask "How do you do (TypeScript thing) in JavaScript"?


Type annotations can add a lot of noise to the code if you don't understand what they are. Bear in mind I'm talking about someone trying to learn something. If they don't know TS you're expectng them to boil code they don't understand down to its essence.

In regards to the jQuery comparison, I'm not suggesting that someone would ask such a question of TS. All I'm saying is that there was an expectation that everything should be done in jQuery at the time.


The author! Hello

> Bear in mind I'm talking about someone trying to learn something. If they don't know TS you're expectng them to boil code they don't understand down to its essence.

I agree with this, but only for people who are new to the JS language, and the content targeting them.

People using JS regularly should be able to separate out TS noise, and asking the world to avoid TS for _every_ piece of knowledge content sounds like hyperbole.

> In regards to the jQuery comparison, I'm not suggesting that someone would ask such a question of TS. All I'm saying is that there was an expectation that everything should be done in jQuery at the time.

Then why include it in your argument?


> People using JS regularly should be able to separate out TS noise, and asking the world to avoid TS for _every_ piece of knowledge content sounds like hyperbole.

I have worked with junior developers who struggle with this. I am not suggesting that all knowledge has to avoid TS, only that which isn't related to it. People who are new to the language want and need to learn _actual_ JS.

It's easy to not see this as a problem when you already know TS. Yes, it is clear what TS is once you know it. Imagine not knowing TS or the concept you are trying to learn about. What part of this is TS? What part of it is the information I am trying to find?

> Then why include it in your argument?

I was simply illustrating that there can be a tendency to assume knowledge which isn't relevant to the problem being solved.


> The 1960s broke authority, and it has never been repaired. It discredited adulthood, and adulthood has never recovered. The attributes of adulthood—responsibility, maturity, self-sacrifice, self-control—are no longer valued, and frequently no longer modeled. So children are stuck: they want to be adults, but they don’t know how. They want to be adults, but it’s easier to remain children. Like children, they can only play at being adults.

Is this true? Did adult-aged humans feel "grown up" pre-1960s?

Or, is a fundamental lack of certainty more intrinsic to our nature?


An uncanny feeling came over me as I was leaving a diner. My eye caught a table with a married couple (who couldn't have been more than a few years out of high school) and a toddler. They managed to look tired, but happy; moreover, they seemed to have things under control. It was like a breeze from a different century.

It's probably that the social context has changed so much. You're not going to have a single high-school-educated income buying a house and supporting the entire family from it. People have thanked Reagan's economic policies for pushing women into the workplace -- a change that took place out of necessity since a single income no longer sufficed for most people.

So what happens when young people realize the game has changed? Do they get married right out of high school, buy a house, and start a family? Or are we talking about going to uni, drowning in debt, and being priced out of the housing market?


The Two-Income Trap is a great book on this topic: https://www.amazon.com/Two-Income-Trap-Middle-Class-Parents-.... Try to ignore the cover, as its content is excellent and the book isn't a partisan jeremiad.


The era of dual earner marriages is over. Let me back up a bit and hedge with acknowledging the real danger in extrapolating from current trends, but let's indulge and while relying on some data.

We're in the early formation of yet another stage of family conceptualization. As the corporate family economy declined over the latter half of the 19th century and early 20th century, the male breadwinner marriage declined from the 1930s-1980, the decline of the dual earner family is beginning its decline[1]. This is complicated with the decline of marriage in general, and marriage itself complicated with dramatically increasing age and rates of divorce.

Male labor force participation has declined from 86% in 1950 to 69% in 2019[2]. Over the same time period women's labor force participation rate rose from 33% to 57%[3]. Simultaneously, the rates of co-habitation continue to rise (0.1 in 1968 to 9.4% in 2018)[4] and outpacing spousal living after 2010(among 18-24yr olds). Disability and addition are prevalent in non-labor force participating(LFP) males[5].

The Richmond Fed's report Male Labor Force Participation: Patterns and Trends describes the relationship.

> Many of those receiving disability payments via Social Security are receiving them for ailments such as mental health disorders and disorders that occur due to long-term obesity and drug or alcohol abuse. Data from the Social Security Disability Program’s 2019 annual report show that 35 percent of Social Security Disability beneficiaries are disabled due to a mental health disorder, with mood disorders most common. An additional 30 percent of beneficiaries have disabilities associated with a musculoskeletal disorder, many of which are due to obesity.

Extrapolating from this we can imagine a world 20-30 years from now where a majority of households are formed under the cohabitation of unmarried partners. The woman here is likely the breadwinner, although all forms of male breadwinner and dual earner households still remain. The unemployed male may be receiving social security for a mental or musculoskeletal disorder due to obesity or drug or alcohol abuse.

While not an optimistic version of the future, there's still the opportunity to be proven wrong, argue about causes, and explore second-order effects within the larger picture all thanks to the magic of extrapolitis.

1. Ruggles 2016. Marriage, Family Systems, and Economic Opportunity in the USA Since 1850 https://users.pop.umn.edu/~ruggles/Articles/marriage.pdf

2. Although post 2019 data is available, I'm excluding it due to not wanting to discuss the gendered effects of COVID on labor. https://fred.stlouisfed.org/series/LNS11300001

3. https://fredblog.stlouisfed.org/2021/03/women-in-the-labor-f...

4. https://www.census.gov/library/stories/2018/11/cohabitation-...

5. https://www.richmondfed.org/-/media/richmondfedorg/publicati...


> The unemployed male may be receiving social security for a mental or musculoskeletal disorder due to obesity or drug or alcohol abuse.

Why would women want to live with such men? They seem more like liabilities than assets.


There are many non-exclusive reasons: companionship, protection, unpaid labor, income, and role-expectations.

Detailing the last three, unpaid labor can look like child care, errand running, home repair, and house work(and while men generally spend less time than women doing this, it isn't zero[1]). Female breadwinner households include male gig work ex: 77% of ride share drivers are male[2]. That's a way of saying that the men in these relationships are not contributing - they can be - just not at a level to be considered a dual earner.

Lastly, let's not discount gender and role expectations. If you are male, have you asked the women in your life if they have been pressured to not be single by their family or peers? Did others have expectations of them? What were their responses?

In my social network, I can name plenty of women who are living with men who engage in drug abuse, alcohol abuse, and have mental disorders, sometimes more than one. I instinctively caricature this type, which makes it more difficult for me to identify these cases, but substance abuse, mental disorders, or physical disorders don't automatically render people homeless, insane, or invalid. They all can, however, make it much more difficult to hold down a steady job or result in under employment.

Nonetheless, some women accept these challenges, while others they regret the pressure they faced or decisions they made in entering these relationships. The effort required to enter and exit relationships is asymmetrical. There is some stickiness to the whole affair even within cohabitating unmarried couples. Deciding to live alone is a serious choice.

1. Table 8C, Table 9 https://www.bls.gov/news.release/archives/atus_06282018.pdf

2. https://gridwise.io/who-are-rideshare-drivers-a-demographic-...


Has anyone seen this yet? I just ran across it, and it looks interesting...


It would be fun to see this with local daylight hours mapped to the squares, so I could get a feel for where my consumption is at within "daylight" vs the whole "day"

SunCalc is a good tool for this, if you're interested: https://github.com/mourner/suncalc

(I've used it on a personal project, and the API was a little awkward but the results are good: https://daylight.website/)


That's interesting - didn't cross my mind! Thanks for the pointer.

Btw, the website you linked doesn't work for me. I get the "Uncaught (in promise) TypeError: navigator.geolocation is undefined" on Firefox 98.0.2 on macOS 12.3.1


Your privacy settings / extensions are blocking geolocation


Your personal project is a pretty cool and interesting way to visualize daylight (especially using the fast forward button to go through a week at a time). Thanks for making it.


Thank you, I'm glad you enjoyed it. I love the week skip too, interesting to see the shape change over the year.

Undocumented feature: if you hold down "w" or "shift+w" keys you can skip through weeks even faster.


I love your personal project! Would make an amazing smartwatch face!


There's an Apple watch face called "solar dial" that's pretty similar, and I've seen others like this.

To me this is the most logical watch face — everything else just confuses matters.



Funnily enough I had that article already saved to pinboard!

Love your app btw, I made a similar clock years ago but with just sunrise and sunset times. I've just updated it with suncalc.js to add twilight times also, so thanks.


Most hackers are active outside of this time range.


Agreed, but still useful IMHO to get a sense of "where" you are in the day.


very cool project!


For web apps: TypeScript with Next.js & Vercel

Next.js takes care of your full-stack web app (client routing, server APIs, the fuzzy world of SSR/SSG/ISR) plus your whole dev/prod build (zero-config React & TypeScript, minimal config ESLint & Prettier)

And Vercel deploys it as easily as `npx vercel --prod`, or just hooking your GitHub repo up to the project through their web UI so it deploys on push. Their integration will even show the deployment status for each commit, from within GitHub.

It's a delightfully streamlined process, and a suite of tools that all have large communities and rich ecosystems.


This is also my experience with Sveltekit[0] on Vercel! I’ve had a lot of fun building cross-platform desktop apps with Sveltekit and Tauri[1] lately too, which is equally delightful. And for one-click databases, Supabase[2] is killer.

[0] https://kit.svelte.dev [1] https://tauri.studio [2] https://supabase.com


Agreed. I particularly like the look of their `<Switch>/<Match>` component[1]:

  <Switch fallback={<div>Not Found</div>}>
    <Match when={state.route === "home"}>
      <Home />
    </Match>
    <Match when={state.route === "settings"}>
      <Settings />
    </Match>
  </Switch>
Which doesn't seem to have an analog in the React babel-plugin[2] or standalone lib[3]

[1] https://www.solidjs.com/docs/latest/api#%3Cswitch%3E%2F%3Cma...

[2] https://github.com/AlexGilleran/jsx-control-statements

[3] https://github.com/samuelneff/react-control-flow


You could very easily implement that pattern yourself in a react app as a few HoCs. So far I think the react project has done a pretty decent job at limiting the surface area of the API. This seems a bit high level.


Agreed, this "primary color based on language" is a cute idea, but awful to actually consume. JavaScript (my most visited) is a low-contrast orange (especially when wrapped with inline-code styling).

Overall the new design does feel more slick, I think it has potential. But I wish they had focused more on readability/usefulness over "cuteness".

This site doesn't need to be "fun" — they've successfully created a useful tool. They should be proud of that, and keep building in that direction.


> At the time, Tesla noted that they were not selling their stake in Bitcoin and that they planned to resume taking Bitcoin payments once the network shows a higher mix of renewable energy.

Is there a hope of this happening, with Bitcoin? I thought proof-of-work coins were fundamentally energy intensive, and proof-of-stake coins (like Ethereum 2.0) are the only way out of it.


Would you spend all day working in VR?

A few months ago, I would say no.

But I got myself a Quest 2 for Christmas, and now... maybe.

AR would make it better though, so I'm not just floating disconnected in digital space. I see in their homepage hero banner background[0] you get a floating window with video of your hands. It would be nice if the whole background is a passthrough to reality, and then you float your OS windows on top of that.

[0] https://simulavr.com/


>But I got myself a Quest 2 for Christmas, and now... maybe.

Let me know what you think in a month. The problem with current VR tech is that it's mindblowing and incredible for the first few days, then it quickly becomes too cumbersome and frustrating to deal with on a regular basis and you forget about it. Mass adoption really won't come until it's as seamless as putting on a pair of reading glasses.


I agree though I'd argue it's not a single axis of "bulkiness/easy of use", and more a balance between "bulkiness/ease of use" and "functionality".

The Quest (and self-contained VR devices generally) has done a lot to move the ball forward on bulkiness/easy of use, but IMO has not done a lot on the functionality part. Most VR experiences are toys that don't have lasting power. It is revealing that FB's marketing for the devices is overwhelmingly about a single game (Beat Saber).

I have a Quest 2 that has been sitting in the closet collecting dust for close to a year now. The experience is pretty mind-blowing the first few times, but there isn't anything there to keep me coming back. Once in a blue moon some novel (and usually rather short) VR experience will draw me back in for a day or two, but then the device goes back into the closet again.

The breakthrough hinges on the combination of easy of use and what the heck there is even to do with the device that is compelling.

[edit] Seeing some other folks opine about the lack of content elsewhere in the thread - yes it's true, but I think framing the issue as one about content leans heavily into the local maxima (which is a very low local maxima) we are in right now, where VR is really only about gaming. I remain unconvinced that gaming is the best use of this technology - and if we implicitly/explicitly define this as a "content problem" rather than a more general "things to do" problem I think we're missing something key.


I agree about the mass adoption threshold, but even the current breed of tech makes the workday-in-VR feat possible: https://news.ycombinator.com/item?id=28678041


Isn't that how the Quest is now? It is for me, pop on the device and get straight into my workout.


The Quest 2 has a few things that prevents me from using it for long sessions.

1. It's way too heavy, which makes it uncomfortable.

2. It gets too hot.

3. It lacks a hinge that would make it possible to easily flip it open, while it's still on your head. Taking it off all the time is annoying.

4. It's been really difficult for me to keep the content I'm viewing looking sharp. It always looks kind of blurry, especially toward the edges.


I think that's the rub; the VR industry is running into a similar issue that the Headphones industry has long dealt with, the reality of different body dimensions. 1 isn't an issue for me thanks to an improved strap, 2 isn't an issue due to, I think, my move to a rubber face wrap, 3 again was fixed with a new strap (though it just comes up onto my forehead rather than tilting), but 4 is the hell that I cannot think of an answer for. I may not have the issue, and maybe that's due to my prescription inserts or maybe it's due to the particular shape to my skull.


I am going into month 3 of every day use for work and play.


It will be. We'll be demoing the AR mode in our Kickstarter ad, but basically the entire background will be replaced by passthrough.

No depth mapping yet, so it'll only be in the background, but first things first.


Nice! That makes it more attractive.

Depth mapping would be great too, like I could pin virtual artifacts to my physical environment? Yes please.


I'm experimenting with mmWave RADAR to get depth mapping without the idiosyncrasies of stereo RGB cameras. Especially in wildly varying environments I think that's the way to go over traditional camera-based SLAM. But if it turns out to be unfeasible, nothing's stopping us from adding more tracking cameras and doing it that way.


I spend most of my days working in the Quest 2 with Immersed. It can ofcourse be better but it works well now. AR would indeed be better. If it is possible to keep the screen dark enough to see with room light of course.


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

Search: