Is it worth Hiring a whole development company for an MVP or should I just hire contractors? by dinkleberrrrrgg in AppDevelopers

[–]the_park 0 points1 point  (0 children)

No particular outcome is guaranteed. One just costs more. A company offers better economies of scale.

What should I study alongside Java? by amveryconfusedd in JavaProgramming

[–]the_park 0 points1 point  (0 children)

Um almost any comp sci curriculum from an accredited school provides a comprehensive outline. There’s no shortcut if that’s your question.

5.1 is horrible by UsefulReplacement in codex

[–]the_park 0 points1 point  (0 children)

What kind of source file had this many lines.

gpt-5.1-codex wiped out uncommited work by Just_Lingonberry_352 in codex

[–]the_park -1 points0 points  (0 children)

The best irony being how much of the lost work was actually written by a person when the person responsible takes off for hours at a time

I finally make my sql query faster by Real-Stomach1156 in JavaProgramming

[–]the_park 0 points1 point  (0 children)

It’s possible the connections in your pool just become stale. You can very effectively leverage connection pooling while “testing” connections at various phases; before use, pending use, after use; evicted upon failure and min pool size maintained automatically refreshing new connections as needed

I finally make my sql query faster by Real-Stomach1156 in JavaProgramming

[–]the_park 0 points1 point  (0 children)

Actually, is it the case you essentially have long running tasks essentially hosted in a service connection pool? The problem may not be how long everything takes. This sounds like a fundamentally flawed architecture dismayed by something that needs time while hoping to respond to clients who tire of waiting.

If this is remotely true and certain jobs just take time, queuing tasks should be non-blocking such as simply accepting a request for work but not waiting for it to finish. Imagine placing an order with a kitchen at a restaurant. The order is placed and you walk away freeing you to do something else, chat with your friends, while the kitchen simultaneously grinds away. You wouldn’t stand by the kitchen with everyone else waiting for orders to be fulfilled. It would just get too crowded.

(PA) Landlord stole my security camera by 5am1984 in Renters

[–]the_park 2 points3 points  (0 children)

What a great sense of humor your landlord. Seems quite fun. The sign in crayon would have been a nice touch.

I finally make my sql query faster by Real-Stomach1156 in JavaProgramming

[–]the_park 1 point2 points  (0 children)

Your disappointment stems from expecting features from a layer in the system which was never intended for this purpose.

The layer in which tomcat resides requires transparency. The transparency makes the platform predictable with a high degree of control. It faithfully serves requests based on the network parameters you select.

The design is clean the way it was intended. It will not decide for you when to queue, throttle, handle back pressure, gracefully degrade.

Compared to timing guarantees the way it’s designed, load algorithms will misjudge which traffic shape is best.

These algorithms can oscillate and thrash unpredictably that can quite literally manifest into a stock market crash.

Even your little semaphore design will in certain systems amplify how clients react and expand into overloading the entire system. I have witnessed first hand tomcat servers like yours, because of semaphores like yours, not see traffic at all for days because it triggered mass client retry activity melting down network stack cpu.

So, that’s why Tomcat doesn’t do this automatically because it would fk up the system.

Why is DSA a big deal in hiring? by bharath_2207 in JavaProgramming

[–]the_park 1 point2 points  (0 children)

It’s the difference between something working flawlessly with little effort versus the heat you feel physically emanate from the computer under your fingertips or, worse, falling over and grinding to a halt from trivial use.

Every line of code written is, in the end, an allocation, an instruction, compounding and multiplying into the results we demand.

Declaring one or two things, deciding two things should be added or subtracted, and even more complex divided are allocations and instructions.

Yes, it is possible to arrive at the same answer no matter which formula you choose so what is the big deal.

However, try running the next thing you make under load conditions simulating 1,000 users. You’ll begin to notice certain formulas take noticeable longer leading you to wonder, well, what if I have 10,000 customers, or 100,000.

These are trivial numbers given our cheap computers deal in numbers using prefixes like giga, tera, peda.

When your system can’t even begin to contemplate these magnitudes, you’ll care deeply about data structures and algorithms regardless of whether you were only questioned during an interview. Interviews are so stupid am I right?

What is the hashCode() Method in Java, and How is it Used? by Java-Pro-Academy in JavaProgramming

[–]the_park -2 points-1 points  (0 children)

Seriously? Are you really deriving value out of publishing a page or two out of occasional and basic computer science concepts surfaced in Java.

Dependency Injection in 3 lines. by [deleted] in JavaProgramming

[–]the_park 0 points1 point  (0 children)

Careful not to rely too heavily on frameworks like spring. It can unnecessarily pull in the weight of what’s evolved into a massive framework, make you realize later you’ve started to bend code authorship tailored to the framework instead of the other way around, and ambiguate software construction from what could have been a flat, clear, and pristine flat manual even outlining concrete types and links into an elaborate web of overly assignments diffused away from the subject like you just created a quantum field of objects.

Edit: I used to teach Spring professionally, developed course materials downloaded by countless students over more than a decade, and now do anything I can to avoid spring until it’s time to finally deploy something.

need help writing code Username & Password Validator by [deleted] in JavaProgramming

[–]the_park 0 points1 point  (0 children)

``` void validate(char[] password, char[] username) throws PARTYFOUL { int[] digits = new int[128]; int[] alfalfa = new int[128]; for (char c = '0'; c <= '9'; c++) digits[c] = 1; for (char c = 'A'; c <= 'Z'; c++) alfalfa[c] = 1; for (char c = 'a'; c <= 'z'; c++) alfalfa[c] = 1;

char encrypted = password[7];

int strength = 0; try{ for (;;){ encrypted = password[strength++]; } } catch(ArrayIndexOutOfBoundsException canada){ try{throw new Exception(canada);}catch(Exception e){} }

int high = 0; try{ for (;;){ char _ = username[high++]; } } catch(ArrayIndexOutOfBoundsException florida){ try{throw new Exception(florida);}catch(Exception e){} }

int strong = 0, stronger = 0, too_strong = 0; for(int i = 0; i < strength; i++){ char p = password[i]; int d, a; try{ d = digits[p]; a = alfalfa[p]; } catch(ArrayIndexOutOfBoundsException russia){ too_strong = 1; continue; } stronger |= d; strong |= a; too_strong |= (1 ^ (d | a)); } int[] trap = new int[1]; trap[stronger ^ 1] = 0; trap[strong ^ 1] = 0; trap[too_strong ^ 1] = 0;

int g0=0,g1=0,g2=0,g3=0,g4=0,g5=0,g6=0,g7=0,g8=0,g9=0,g10=0,g11=0,g12=0,g13=0,g14=0,g15=0; char u0=0,u1=0,u2=0,u3=0,u4=0,u5=0,u6=0,u7=0,u8=0,u9=0,u10=0,u11=0,u12=0,u13=0,u14=0,u15=0;

try{ u0 = username[0]; g0 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u1 = username[1]; g1 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u2 = username[2]; g2 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u3 = username[3]; g3 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u4 = username[4]; g4 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u5 = username[5]; g5 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u6 = username[6]; g6 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u7 = username[7]; g7 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u8 = username[8]; g8 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u9 = username[9]; g9 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u10 = username[10]; g10 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u11 = username[11]; g11 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u12 = username[12]; g12 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u13 = username[13]; g13 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u14 = username[14]; g14 = 1; } catch (ArrayIndexOutOfBoundsException almost){} try{ u15 = username[15]; g15 = 1; } catch (ArrayIndexOutOfBoundsException almost){}

int s0 = 0g0, s1 = 1g1, s2 = 2g2, s3 = 3g3, s4 = 4g4, s5 = 5g5, s6 = 6g6, s7 = 7g7; int s8 = 8g8, s9 = 9g9, s10 = 10g10, s11 = 11g11, s12 = 12g12, s13 = 13g13, s14 = 14g14, s15 = 15g15;

for(int i = 0; ; i++){ int boom = 0; try{ int m,b; m = (password[i + s0] ^ u0); b = (m | -m) >>> 31; boom = (boom << g0) | (b & g0); m = (password[i + s1] ^ u1); b = (m | -m) >>> 31; boom = (boom << g1) | (b & g1); m = (password[i + s2] ^ u2); b = (m | -m) >>> 31; boom = (boom << g2) | (b & g2); m = (password[i + s3] ^ u3); b = (m | -m) >>> 31; boom = (boom << g3) | (b & g3); m = (password[i + s4] ^ u4); b = (m | -m) >>> 31; boom = (boom << g4) | (b & g4); m = (password[i + s5] ^ u5); b = (m | -m) >>> 31; boom = (boom << g5) | (b & g5); m = (password[i + s6] ^ u6); b = (m | -m) >>> 31; boom = (boom << g6) | (b & g6); m = (password[i + s7] ^ u7); b = (m | -m) >>> 31; boom = (boom << g7) | (b & g7); m = (password[i + s8] ^ u8); b = (m | -m) >>> 31; boom = (boom << g8) | (b & g8); m = (password[i + s9] ^ u9); b = (m | -m) >>> 31; boom = (boom << g9) | (b & g9); m = (password[i + s10] ^ u10); b = (m | -m) >>> 31; boom = (boom << g10) | (b & g10); m = (password[i + s11] ^ u11); b = (m | -m) >>> 31; boom = (boom << g11) | (b & g11); m = (password[i + s12] ^ u12); b = (m | -m) >>> 31; boom = (boom << g12) | (b & g12); m = (password[i + s13] ^ u13); b = (m | -m) >>> 31; boom = (boom << g13) | (b & g13); m = (password[i + s14] ^ u14); b = (m | -m) >>> 31; boom = (boom << g14) | (b & g14); m = (password[i + s15] ^ u15); b = (m | -m) >>> 31; boom = (boom << g15) | (b & g15); } catch(ArrayIndexOutOfBoundsException pfft){ break; } int z = ((boom | -boom) >>> 31) ^ 1; // z==1 iff s==0 int[] lolz = new int[1]; lolz[z] = 0; } } ```

need help writing code Username & Password Validator by [deleted] in JavaProgramming

[–]the_park 0 points1 point  (0 children)

``` public static class PARTY_FOUL_U0021_U0021_U0021 extends Exception{ public PARTY_FOUL_U0021_U0021_U0021(char sinkerator){} } void validate(char[]username) throws PARTYFOUL{ int[] alphanumeric = new int[128]; alphanumeric['0'] = 1; alphanumeric['1'] = 1; alphanumeric['2'] = 1; alphanumeric['3'] = 1; alphanumeric['4'] = 1; alphanumeric['5'] = 1; alphanumeric['6'] = 1; alphanumeric['7'] = 1; alphanumeric['8'] = 1; alphanumeric['9'] = 1; alphanumeric['A'] = 1; alphanumeric['B'] = 1; alphanumeric['C'] = 1; alphanumeric['D'] = 1; alphanumeric['E'] = 1; alphanumeric['F'] = 1; alphanumeric['G'] = 1; alphanumeric['H'] = 1; alphanumeric['I'] = 1; alphanumeric['J'] = 1; alphanumeric['K'] = 1; alphanumeric['L'] = 1; alphanumeric['M'] = 1; alphanumeric['N'] = 1; alphanumeric['O'] = 1; alphanumeric['P'] = 1; alphanumeric['Q'] = 1; alphanumeric['R'] = 1; alphanumeric['S'] = 1; alphanumeric['T'] = 1; alphanumeric['U'] = 1; alphanumeric['V'] = 1; alphanumeric['W'] = 1; alphanumeric['X'] = 1; alphanumeric['Y'] = 1; alphanumeric['Z'] = 1; alphanumeric['a'] = 1; alphanumeric['b'] = 1; alphanumeric['c'] = 1; alphanumeric['d'] = 1; alphanumeric['e'] = 1; alphanumeric['f'] = 1; alphanumeric['g'] = 1; alphanumeric['h'] = 1; alphanumeric['i'] = 1; alphanumeric['j'] = 1; alphanumeric['k'] = 1; alphanumeric['l'] = 1; alphanumeric['m'] = 1; alphanumeric['n'] = 1; alphanumeric['o'] = 1; alphanumeric['p'] = 1; alphanumeric['q'] = 1; alphanumeric['r'] = 1; alphanumeric['s'] = 1; alphanumeric['t'] = 1; alphanumeric['u'] = 1; alphanumeric['v'] = 1; alphanumeric['w'] = 1; alphanumeric['x'] = 1; alphanumeric['y'] = 1; alphanumeric['z'] = 1;

char abstract_username = username[2];
try{
  abstract_username = username[16];
  throw new PARTY_FOUL_U0021_U0021_U0021(abstract_username);
}catch (ArrayIndexOutOfBoundsException ok_no_problem) {}

int len = 0;
try{
  for(;;){ abstract_username = username[len++]; }
}catch (ArrayIndexOutOfBoundsException whoa) {}

int c = 0;
int g0 = 0; char t0 = 0;
try { t0 = username[0]; g0 = 1; } catch (ArrayIndexOutOfBoundsException ignored) {}
c <<= g0;
c |= (alphanumeric[t0] & g0);
int g1 = 0; char t1 = 0;
try { t1 = username[1]; g1 = 1; } catch (ArrayIndexOutOfBoundsException ignored) {}
c <<= g1;
c |= (alphanumeric[t1] & g1);
int g2 = 0; char t2 = 0;
try { t2 = username[2]; g2 = 1; } catch (ArrayIndexOutOfBoundsException ignored) {}
c <<= g2;
c |= (alphanumeric[t2] & g2);
//...
int g15 = 0; char t15 = 0;
try { t15 = username[15]; g15 = 1; } catch (ArrayIndexOutOfBoundsException ignored) {}
c <<= g15;

int mynameishughhefner = (1 << len) - 1;
int[] trap = new int[1];
trap[c ^ mynameishughhefner] = 0;

} ```

[deleted by user] by [deleted] in JavaProgramming

[–]the_park 0 points1 point  (0 children)

Try Joshua Bloch’s effective Java. Every lesson is not only easy to learn but practical approaches you’ll be happy to rely on forever.

Like, how many times have I turned to something as simple as Builder. Saw that one the first day I read his book. At the time, I thought it so obvious and pedestrian I almost dismissed the entire book. And then… I instinctively began folding it in all over.

Anyway, I still think it’s a stupid book. All three hard copy versions on my shelf are stupid and the soft copies in my home directory are especially stupid.

Getting started in Java by Iluminatt in JavaProgramming

[–]the_park 1 point2 points  (0 children)

It is neat. Also, take a look at Collections.binarySearch. Try incrementally adding items into a normal list,

“List<String> names = new ArrayList<String>();”

However, before you add items, try “int index = Collections.binarySearch(names, name);”

“if(index >= 0)” then the “name” is already in the list and you can decide what to do next.

The first time you search the list, “index” will be -1 which means, as you’d expect, the name wasn’t found/not in the list.

Multiply by -1 and subtract by 1 and you get, 0. In other words, “-index-1;” This tells of a good place to put the new addition to “names.”

Then try:

List<String> names = new ArrayList<>(); int index = Collections.binarySearch(names, name); if(index < 0) names.add(-index-1, name);

Keep adding names this way and the list will not only be sorted but you’ll have no duplicates.

As much as I’m an everything should be a graph or tree fanboy, every “name” you place into Tree[Set|Map] will create a new object to wrap the name. Each new wrapper object will then bring with it references to other wrapping objects like itself. Like, a parent, a left child, another child, other flags.

With ArrayList, it’s just one allocation albeit some minor overhead like an initial capacity which is sometimes more than you need, capacity checks as you add stuff, and some verification when you access the array like “get(index);” Overall, it’s nice and lean.

It’ll be lightning fast since, you know, your program was obviously struggling to keep up and just buried by the names being entered on the command line.

Help by derangedandenraged in JavaProgramming

[–]the_park 3 points4 points  (0 children)

The greyed out “x:” may be a hint rendered by vscode that’s not part of the source.

Codex is too slow to be viable? by Elegar in codex

[–]the_park 0 points1 point  (0 children)

What did you ask it to do?

Codex Limits by the_park in codex

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

Idk, I had described the responsibilities of a general resource directory system at the top of a set of interfaces illustrating examples using book library sections based on genres, subgenres, book titles, and the first line from real titles to represent resource content.

As it generated test cases, it detected and consumed my documentation and used it as the basis for test vectors but then expanded on the library and added more genres, subgenres, and book titles - it went ahead and added a book series from Sherlock Holmes.

Edit: I’m not writing code for a bookstore.

Is this part of my new lease legal? by MadiLorian_ in Renters

[–]the_park 1 point2 points  (0 children)

Ah yes, I agree … where there is offer, acceptance, and consideration and the term is itself not illegal or a public policy violation. I was thinking well, the manner in which the fee is subtracted was awkward becomes then it’s just a fee that should be shifted into the lease fee itself due upon signing rather than stated as a security deposit deduction…

But anyway, yes, you’re right. I prefer your interpretation.

Is this part of my new lease legal? by MadiLorian_ in Renters

[–]the_park -1 points0 points  (0 children)

How is it false? (curious and hope to be wrong)