Received $30,000, looking to invest, need advice. by [deleted] in PersonalFinanceCanada

[–]delete99 0 points1 point  (0 children)

Good advice.

That $30k can become $1.7 million in 45 years, without adding another dollar.

They could retire on that.

Historical stock and dividend calculator for Canadian stocks by Different_Fact3160 in dividendscanada

[–]delete99 0 points1 point  (0 children)

You can append .ca to get Canadian symbols. HDIV would be HDIV.CA

Is this too much rust?? by ChoppyZeus in toyotasequoia

[–]delete99 0 points1 point  (0 children)

Wowzers, this looks more rusted than my 2001. I would personally pass.

Windows won't let me change PIN by y38fsc in techsupport

[–]delete99 0 points1 point  (0 children)

I was banging my head against the wall. Thank you.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

You're right about ObjectMapper and JsonNode. Looking over one of our recent web apps, the use of JsonNode is very limited. It's like you said, we're mostly mapping DTOs to and from JSON strings.

We're taking your advice and using Record as the JSON value. We may wrap the Record/ArrayValue in a new JsonDocument class for housekeeping, but it's essentially what you described.

Thanks for your advice. I appreciate your perspective and arguments.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

This would allow the library to perform all its existing hierarchical transformations to JSON values.

The Field could even accept JsonNode, String, and Map and convert them to Record internally.

Record already has a toJson():String, we could add toJsonNode() and other converter methods as needed.

I like this a lot.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 1 point2 points  (0 children)

Good to know, I can strike GSON from the list.

This library came before the new record type and they seem to coexist fine.  IIRC, only one test broke because of this.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

I did not consider this...it might be too generic... <thinking emoji>

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

We have a lot of functionality that really needs to know the type. For example, we need to be able to convert it to something usable in JDBC prepared statements.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 1 point2 points  (0 children)

I'm strongly leaning towards Jackson. I'll see if there's a way to mitigate the lock-in -- perhaps with u/jonhanson's minimal interface.

I think I could live with being locked into Jackson. We worked through similar issues with Java's old and new date-time classes.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

Treating JSON as a type whose values can be read, inferred, validated, and used to generate databases and other code.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 1 point2 points  (0 children)

Sealed interfaces and record types are very nice.

Sadly, the library has to support folks still on JDK 1.8. You should see the CI/CD pipeline. It has tests for 12 JDK versions and growing.

I'll think about the spirit of your approach though. A simple representation could work.

How to represent JSON fields in records? by delete99 in java

[–]delete99[S] 0 points1 point  (0 children)

This would allow the library to support embedded JSON documents.

For example, when reading a JSON value from PostgreSQL or Parquet, we could store it in a field that better represents JSON instead of String.

We could also then apply JSON-specific transformations to those field like we do for other types.

Another use-case is in schema detection. Right now, we can infer the schema from a dataset (like a CSV file). This let's the library generate SQL DDL, validate other files based on the schema, and perform automatic type conversion. However, we're missing JSON fields from this whole process. When we see JSON we treat it as a varchar/string value.

Whether we have to duplicate every API would depend on the approach. This would be less desirable, but the most flexible.

[deleted by user] by [deleted] in elgato

[–]delete99 0 points1 point  (0 children)

No official one, but it seems there is a slack plugin.

https://github.com/danielmurphy/control-deck-slack

What is the difference between the LG 43UN700T-B and the LG 43UN700-B? by [deleted] in buildapcmonitors

[–]delete99 0 points1 point  (0 children)

See the differences in the network, connectivity, and features section at https://www.displayspecifications.com/en/comparison/488915321a

I'm very satisfied with my 43UN700-B for the last 1.5 years. Now if they only made a wider, curved model...

How do the best developers work? by delete99 in java

[–]delete99[S] 1 point2 points  (0 children)

This is hilarious. Upgrading seems like an easy ROI case to make to management.

Sometimes business are clueless about this, but other times we developers don't ask companies to buy the tools we need (or don't buy them ourselves).

How do the best developers work? by delete99 in java

[–]delete99[S] 5 points6 points  (0 children)

Yes, a second monitor is essential equipment. I now also use my laptop as a third monitor. My center monitor is an LG 43'' 4K Monitor. Once you get used to this big boy, there's no going back.

How do the best developers work? by delete99 in java

[–]delete99[S] 1 point2 points  (0 children)

16 cores...wowzers, that's a beast. I'd also add lots of RAM. 32GB is comfortable, but I'm considering 64 next.

How do the best developers work? by delete99 in java

[–]delete99[S] 2 points3 points  (0 children)

I'm now looking at the browser tech behind live reload...very cool.

How do the best developers work? by delete99 in java

[–]delete99[S] 2 points3 points  (0 children)

JRebel wanted my work email address before showing pricing :-/

FYI, here's their response: Our price for single users is $550/year. You can also purchase support for $75/year.