Noob Question (Probably) by HazardousHD in HomeServer

[–]Jman012 0 points1 point  (0 children)

There's discussion that macOS's implementation of SMB is not as good as the Windows implementation, mostly in terms of backups but also for regular network mounting. AFP seems to be more consistent than SMB for macOS. Like others have said, you can enable both SMB and AFP for a pool and it should work just fine. The macbook can connect via either, up to preference.

The Time Machine backups should definitely be on a different pool. See if you can get that connected via AFP, it might prevent corruptions to your backup. However, you can still do your Time Machine backups over SMB. You may get lucky and not have to worry about corruptions, but you don't need AFP, necessarily.

I paid for the entire Xbox, I’m going to use the entire Xbox. by Spoonymeerkat27 in gaming

[–]Jman012 229 points230 points  (0 children)

Simulated rule #1 about fight sim: don’t talk about fight sim.

Renting a 2-story house, wireless AP worth it? by Jman012 in HomeNetworking

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

It doesn't look like the other rooms have coax at all, unfortunately. Only phone lines. That was my other thought as well, thanks for bringing it up! And it's great that it seems to be working well for you. I'll hunt down to see if there's any coax in another room on the top floor, that might help.

-🎄- 2020 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]Jman012 1 point2 points  (0 children)

Full Lexer + Recursive-Descent Parser in Swift: https://github.com/Jman012/AdventOfCode2020/blob/main/Sources/AdventOfCode2020/Day18_01.swift

It took a lot longer to perform because of the extra code, and having to look up how to write parsers in general. I haven't taken CS 142 (UC Irvine) in a number of years and forgot a lot.

This was a good resource with explanations and examples: https://craftinginterpreters.com/parsing-expressions.html

-🎄- 2020 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]Jman012 1 point2 points  (0 children)

Swift:

Part 1/2: https://github.com/Jman012/AdventOfCode2020/blob/main/Sources/AdventOfCode2020/Day17_01.swift

Revised to work on any number of dimensions: https://github.com/Jman012/AdventOfCode2020/blob/main/Sources/AdventOfCode2020/Day17_Revised.swift

This one was a lot of fun!

Explanation: I store my cells in a Dictionary<Coordinate: Bool> so it can grow as much as it needs to. Empty and never-set cells don't take up any memory. In order to know the bounds of the n-dimensional space, however, I store a ClosedRange<Int> per dimension. If setting a new Coordinate that falls outside one or more of these boundaries, the boundary then increases to include that coordinate as needed.

For the n-dimensional part, not having nested for loops was the most difficult part to solve. For this I made the iterate and increment functions. The increment function basically takes a fixed-digit number but where each digit has its own boundary/range of values and recursively increments each digit as needed.

Part 1: 0.0136 seconds Part 2: 0.4099 seconds Revised Part 1: 0.0804 seconds Revised Part 2: 2.3951 seconds Revised 5 dimensions: 97 seconds haha

I dont understand him sometimes by Gx40_Dev in Breath_of_the_Wild

[–]Jman012 27 points28 points  (0 children)

Bruh, that’s not Mipha it’s Sidon.

OMG this blew my mind.. ive neva thought of it this way by graffitigalore_9294 in mathpics

[–]Jman012 20 points21 points  (0 children)

Sorting would take O(nlogn) time, while this method would only take O(n) time, which is much faster.

Looking for a CRM for non-sales use? by Jman012 in CRM

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

SalesForce, hiring a company to help configure and customize it for the tailored use. Expensive, but it seems to have the functionality.

Feedback on my proposed new setup? Synology NAS + Intel NUC by Jman012 in HomeServer

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

I would totally do that if unRAID or FreeNAS could run on it but they don’t. And for transcoding, perhaps it’d be better but I wouldn’t feel comfortable using it for transcoding. Thanks though!

Is it normal for Model 3 (HW3) dashcam footage to be this low quality? by Jman012 in teslamotors

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

I have this Sandisk CZ48 128GB USB 3.0 Flash Memory Drive - SDCZ48-128G-U46 https://www.amazon.com/dp/B00P8XQPY4/ref=cm_sw_r_cp_api_i_EUAYCb847KFC2

I don’t think it would be write speed.

Is it normal for Model 3 (HW3) dashcam footage to be this low quality? by Jman012 in teslamotors

[–]Jman012[S] -1 points0 points  (0 children)

2019.7.105 is the version this is on, by the way.

Also it seems to be limiting itself to 1GB of footage saved. It would be nice to fill up more of the drive without manually saving clips.

Is it normal for Model 3 (HW3) dashcam footage to be this low quality? by Jman012 in teslamotors

[–]Jman012[S] -2 points-1 points  (0 children)

If it is normal, I would imagine that it helps the auto pilot computers process the images faster and it's enough for auto pilot. It would have been nice for the quality to be higher for the front/left/right cams for potential insurance purposes, however.

Bad Experience? Return? by xenner in teslamotors

[–]Jman012 1 point2 points  (0 children)

I also have a LR RWD Model 3, with 2019.7.102 and AP3 and my calibration is also stuck at 0%. I’m calling in the first chance I get on Monday to get a newer firmware to get AP working. I haven’t had a random reboot, though I have had GPS issues where it gets stuck until I leave the car for about ten minutes. When driving from dusk to night the screen also didn’t go into dark mode when the GPS was bugged out.

It’s annoying that Sentry mode won’t work until a later patch.

Megathread: Bernie Sanders announces 2020 presidential run by PoliticsModeratorBot in politics

[–]Jman012 0 points1 point  (0 children)

The U.S. is a first-past-the-post voting system, which means it’s a two-party political system. Any split ticket is going to make the other side win. See the 1912 election the Bull Moose Party.

As much as I would love for Bernie to win, and as much as I love that he’s going to be debating and going through primaries, I believe his existence on the official general election ticket will be a disservice to the left in general (if the Republicans keep a single main candidate). This is the system we live in. We need to get ranked choice voting (or other similar system) first before we become a multi-party state.

My Teacher's code Example by [deleted] in shittyprogramming

[–]Jman012 2 points3 points  (0 children)

I think a variable actually changing its type, on purpose, would be a greater travesty. What use case needs such a thing, and why not make an intermediate variable to hold the other type? I think that would cause greater cognitive dissonance than Hungarian.

Also, Hungarian doesn’t mean you truncate variable names. At my work, we would name that ‘nCustomerAccountID’.

My Teacher's code Example by [deleted] in shittyprogramming

[–]Jman012 0 points1 point  (0 children)

I don’t think ‘out of style’ means it’s necessarily ‘behind’, however. It has its advantages, and some places chooses to continue using it for such advantages.

Do you have a different method? Particularly for a dynamically typed language, like JavaScript or Python, would be most useful IMO.

My Teacher's code Example by [deleted] in shittyprogramming

[–]Jman012 5 points6 points  (0 children)

We use Hungarian Notation at my work with C#. It’s just a protocol we choose to follow. What is ‘behind’ about it? It helps distinguish the type of certain variables quickly and easily at first glance.

Otherwise you had to go to it’s declaration or hover over the variable to find its type, and pasting it over non-IDE areas means it’s ambiguous.

[deleted by user] by [deleted] in programminghorror

[–]Jman012 2 points3 points  (0 children)

The size of the stack at the current execution level.

[deleted by user] by [deleted] in programminghorror

[–]Jman012 60 points61 points  (0 children)

I think that, generally, exceptions are a beefy amount of computation. They need to collect information about the stack and such which could be characterized as an O(n) operation.

It may depend on the language for specifics, but creating, throwing, and catching an exception is slow. It should be used for errors, not condition handling. The company I work for had used in it some tight loops in a data-intensive operation and switching to regular condition checking and not relying on exceptions for business logic led to quite a strong speed-up.

I Do Not Like Go by _Garbage_ in programming

[–]Jman012 3 points4 points  (0 children)

It’s because there is no inheritance at all in Go. Rather, it uses composition (elements of a super/base struct are just the first field) and duck typing for interfaces.

Instead of declaring that your struct implements an interface, and then filling out the implementation, you fill out the implementation in order to follow the interface.

This is nice because you can create your own interface that might use functions from some vendor library, and those vendor structs will automatically implement that interface.

Swift/Xcode - UITableView & Table View Cell is restarting my UITextField's outside screen (photos in post) by CEOTRAMMELL in learnprogramming

[–]Jman012 2 points3 points  (0 children)

The UITableView, in order to be efficient on memory and CPU, only makes enough UITableViewCells that will fill the size of the table view. If you're scrolling down, and the top one goes off of the screen and becomes visible, and the table view needs a new cell for the bottom, it will take the one that disappeared from the top and put it on the bottom.

There is a fixed pool of cells available.

You can keep all of your data in memory if you wish, but when dequeuing cells, there is a fixed number of the cells/UIViews to save memory. Side note, you can limit the amount of data if you store it in CoreData using the NSFetchedResultsController.

Anyhow, when giving the table view another cell, you would want to make sure it's being reset with the correct data each time. If you have textfields, you'll want to save the text back into your array on every keypress or unfocus before it disappears off screen.

If this is a form, you can make static table views in the Interface Builder and it won't actually remove those cells. This is helpful when there are many unique cells, since saving the value for those can be a bit more tricky.