• 0 Posts
  • 14 Comments
Joined 2 years ago
cake
Cake day: December 26th, 2023

help-circle

  • Must be nice to work work in such an agile company. Around here, we need to produce an updated requirements specification. Review that specification internally. Send the updated specification out to stakeholders for review. Put a bug in the backlog. Wait until someone important files a new bug report (which is now an actual bug report). Actually produce a fix. Hold a change review meeting. Merge the fix. Test the fix. Fail during testing because the tester is new to the project and flags 100 critical bugs that have been sitting in the backlog for years. Ship a release. Receive a bug report that we no longer produce screenshots. Fly an engineer to location to investigate. Advice the customer to update a 5 line script to point to the new location. “We don’t have bandwidth to update that system.”. Hide the fix behind an obscure undocumented option that defaults to off. Ship an emergency bug fix. Wait for the next bug report. Close bug report as "user error. User forgot to set enable ‘screenshots are not videos’ flag in tweaks>advanced>video menu ".


  • I’ve used it a fair amount for memory mapped IO where the hardware defined bitfields. It is also useful when you have a data format with bitfields. I’d say it is also useful when your data does not respect byte boundaries, but the only time I’ve run into that involved the bit order being “backwards”, which means that I still had to bittwidle things back together.

    From a performance perspective, a cache line is only 64 bytes. Space in registers, low level memory caches, and memory throughout are all limited as well.



  • I think the image assumes that the viewer is familiar with merge sort, which is something you will learn in basically every undegraduate CS program, then never use.

    To answer your first question, it helps to have something to compare it against. I think the most obvious way of sorting a list would be “insertion sort”, where you look through the unsorted list, find the smallest element, put that in the sorted list, then repeat for the second smallest element. If the list has N elements, this requires you to loop through it N times. Since every loop involves looking at N elements, this means you end up taking N * N time to sort the list.

    With merge sort, the critical observation is that if you have 2 sublists that are sorted you know the smallest element is at the start of one of the two input lists, so you can skip the inner loop where you would search for the smallest element. The means that each layer in merge sort takes only about N operations. However, each layer halves the number of lists, so you only need about log_2(N) layers, so the entire sort can be done in around N * log(N) time.

    Since NlogN is smaller then N^2, this makes merge sort theoretically better.


  • Be sure to check state law before doing this.

    In Ohia V Miller (2024), Miller was found guilty of operating a vehicle under the influence after he drunkenly drove a horse drawn buggy. This finding was upheld my the appelete court.

    In State v Blowers (1986), the Utah Supreme Court found that riding a horse while intoxicated did not qualify as DUI. This finding had 2 parts: A) A horse is not a vehicle and

    B) The provision:

    Every person riding an animal or driving any animal-drawn vehicle upon a roadway is subject to this chapter, except those provisions which by their nature can have no application.

    Is unconstitutionally vague.

    In the case of Mythbusters v Drunk Driving, the Mybuster found that it is illegal to operate a vehicle while drunk, even on a closed course. However, it is legal for a blind man to operate a vehicle under the direction of a drunk man.


  • I think what happened here is that something went wrong and messed up the permissions of some of the users files. MS help suggested that he login as an administrator and reatore the intended permissions.

    I don’t work with Windows boxes, but see a similar situation come up often enough on Linux boxes. Typically, the cause is that the user elevated to root (e.g. the administrator account) and did something that probably should have been done from their normal account. Now, root owns some user files and things are a big mess until you go back to root and restore the permissions.

    It use to be that this type of thing was not an issue on single user machines, because the one user had full privileges. The industry has since settled on a model of a single user nachine where the user typically has limited privileges, but can elevate when needed. This protects against a lot of ways a user can accidentally destroy their system.

    Having said that, my understanding of Windows is that in a typical single user setup, you can elevate a single program to admin privileges by right clicking and selecting “run as administrator”, so the advice to login as an administrator may not have been nessasary.




  • Java did have a Security Manager that can be used to prevent this sort of thing. The original thinking was that the Java runtime would essentially be an OS, and you could have different applets running within the runtime. This required a permission system where you could confine the permissions of parts of a Java program without confining the entire thing; which led to the Java security manager.

    Having said that, the Java Security Manager, while an interesting idea, has never been good. The only place it has ever seen significant use was in webapps, where it earned Java the reputation for being insecure. Nowadays, Java webapps are ancient history due to the success of Javascript.

    The security manager was depreciated in Java 17, and I believe removed entirely in Java 21.



  • There are still a lot of rather arbitrary decisions to make.

    Is 4/pi inside or outside of the summation?

    Is it (-1)^n+1 or (-1)^n with an additional negative sign in any of the other natural locations for it.

    Is the e term outside of the fraction with a negative exponent, or part of the denominator.

    Do you start with n=0 or n=1 (and adjust the terms inside the summation accordingly)

    Did they expand (2n+1)^2?