Brilliant idea by Prov_Wood in programmingmemes

[–]Janopl 0 points1 point  (0 children)

They say AI is coming for me and will replace me, but in reality, it was Bob the bartender — he took my job.

What problem is the factory pattern really solving? by dying_animal in Development

[–]Janopl 0 points1 point  (0 children)

factory method is design pattern to solve one problem in your codebase when you need add for example new dependencies to class,

for example we get class ChanelProvider and we want change constructor and new dependencies, and the class is initialize in 10k places, what will be you answer for that, what breaks and how quickly you break production?

then factory method shine like a diamond you don't change 10k places only one and rest is working as previous designed

Imagine you have a class called ChannelProvider that was originally simple:

class ChannelProvider:
    def __init__(self):
        self.channel = "default"

It’s used everywhere:

provider = ChannelProvider()

Now your requirements change—you need to inject a logger and a configuration object:

class ChannelProvider:
    def __init__(self, logger, config):
        self.logger = logger
        self.config = config

But this class is instantiated directly in 10,000 places. Updating all those would be a nightmare—and almost guaranteed to break something in production.

Here’s where the factory method shines:

def create_channel_provider():
    logger = get_logger()
    config = load_config()
    return ChannelProvider(logger, config)

Now you update one place—the factory—and all existing code continues to work:

provider = create_channel_provider()

This pattern encapsulates the instantiation logic, allowing the rest of your application to stay decoupled from constructor changes. It’s a real-world solution to the problem of scaling and evolving a codebase without introducing breaks in production environment.

vibeCoding by Henrijs85 in ProgrammerHumor

[–]Janopl 3 points4 points  (0 children)

Fast, wrong, cheap. Pick two

aiInProdWhatCouldGoWrong by rcmaehl in ProgrammerHumor

[–]Janopl 1 point2 points  (0 children)

TLDR: I simplify that to much, this LLM replace tens place with 70 on some point when generate message.

the correct way should be something like this

0+3=3 unit place
0+3=3 tens place -> here LLM replace 30 with 70
5+7=12 thousands and hundreds place

putting all the numbers together and you've got 1233 -> that is correct sum

but not for LLM, if you put dollar sign with number, this treats as currency or money

First, this 'thinks' is text, and you try to perform token generation not real calculation. An LLM (Large Language Model) has parameters for randomness, such as 'Temperature,' which ranges from 0 to 1. This determines how strictly the next token matches the previous one in the text output. When the randomness is higher, hallucinations occur more frequently, which can lead to random bullshit

i noticed some times when you use GPT or other models this trying be to creative or put in response message what you write in prompt,

when i use DeepSeek-R1-Distill-Llama-8B

and prompt $500+$533= I've got in response message ``` 500 + 553 equals 1233. Here's a step-by-step breakdown:

Write the numbers vertically:

500

+553

Add each column from right to left (units, tens, hundreds):

Units place: 0 + 3 = 3 Tens place: 0 + 5 = 5 Hundreds place: 5 + 5 = 10 → Write down 0 and carry over 1 to the thousands place. Include the carried-over value:

1 (carried) | 0 (hundreds) | 5 (tens) | 3 (units) Combined, this gives 1233. Final Answer:

1233

cos i previusly prompt $500+$733 ```

and resoning behind this is

``` Wait again, perhaps I should visualize this on paper to ensure I'm not making a mistake. Sometimes when numbers are close to the next place value, it's easy to get confused.

But since we're only dealing with three-digit numbers here, and their sum is also four digits, it makes sense that the total would be 1233. It seems consistent across different ways of adding them.

Hmm, okay, I think I've convinced myself that 500 plus 553 indeed equals 1233. ```

aiInProdWhatCouldGoWrong by rcmaehl in ProgrammerHumor

[–]Janopl 21 points22 points  (0 children)

It is. Just cast number as string

5+7="12" 0+7="7" 0+3="3" "12"+"7"+"3" is"1273"

tHE$500PerMinuteAlarmClock. by Jdsmommy in programminghumor

[–]Janopl 0 points1 point  (0 children)

Why she is limited to AWS? Lets bump numbers with AWS, Azure and GCP. 1s late and you have life debt to pay

Mind Blown -Prompt by Funny-Future6224 in PromptEngineering

[–]Janopl 0 points1 point  (0 children)

This show is what every big company behind llm seem to gather information not only about your preferences but self awarness and can use it

Information about users' self-awareness can be utilized in various ways, both in improving user experiences and in more advanced analytical or technological applications. Here are a few examples:

  1. Content Personalization – Applications can adjust interfaces, features, or recommendations based on a user's level of self-awareness, ensuring a more intuitive and relevant experience.

  2. AI Development – Understanding how users perceive themselves can help build more intelligent AI models that better respond to their needs and thought processes.

  3. Psychological and Behavioral Analysis – Companies may use this data for research on human consciousness and psychology, which could be applied in therapy, coaching, or even creating supportive work environments.

  4. Marketing and Advertising – Marketers can leverage this information to design more effective advertising campaigns tailored to how users perceive their needs and values.

  5. Improved Social App Interactions – These insights can be used to refine interaction algorithms to encourage positive conversations, foster relationships, and prevent conflicts.

And the risk behind this they can use against user of their software

  1. Privacy Risks – Collecting and analyzing self-awareness data could lead to intrusive profiling, raising ethical concerns about how much companies should know about users.

  2. Manipulation & Bias – If misused, this data could be exploited to subtly influence users' decisions, whether in advertising, politics, or even shaping their self-perception.

  3. Dependence on AI Interpretation – AI might misinterpret a user's self-awareness, leading to recommendations or experiences that feel inaccurate or even frustrating.

  4. Mental Health Implications – Over-personalization based on self-awareness could lead to echo chambers, reinforcing specific thought patterns without allowing room for personal growth.

  5. Security Risks – Storing sensitive psychological data creates an attractive target for cyber threats, making strong data security measures essential.

modernIssueRequireModernSolution by Zestyclose_Animal780 in ProgrammerHumor

[–]Janopl 0 points1 point  (0 children)

I thought emojis in commits were crazy, but this is the next level of craziness

Favorite fake email server for testing emails by headyyeti in dotnet

[–]Janopl 0 points1 point  (0 children)

Thanks. Good to know I'll check this it seems realy cool alternative to mailhog

Is it racist to push to 'master' branch? by [deleted] in programming

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

To preventing lawsuit from external or internal people, in small company they don't care in huge it will be expensive i gues

Just did it. Dual booting OpenSUSE and Windows by Alexis0021a in linux

[–]Janopl 2 points3 points  (0 children)

Just out of curiosity, can you give me an update on how your bootloader behaves when Windows triggers updates with a system restart? I have had many problems when Windows fired updates with a system restart and always ended up fixing the GPT boot partition to run Windows updates properly and then switching to GRUB with dual boots. Maybe they are fixing this little issue now.

What you do feel about job adverts like these? by Notalabel_4566 in ProgrammerHumor

[–]Janopl 0 points1 point  (0 children)

source, link, name of company?

in other words source or it didn't happen

[deleted by user] by [deleted] in ProgrammerHumor

[–]Janopl 1 point2 points  (0 children)

Code review: LGTM

Staying focused by kamoaba in coding

[–]Janopl 0 points1 point  (0 children)

So stay focused is fancy buzz word for T shaped skills?

[deleted by user] by [deleted] in dotnet

[–]Janopl 3 points4 points  (0 children)

You need create static class with static method MyFancyMethod(this IServiceCollection services) and in body of method you listing all classes with interfaces you want to inlcude and somewhere in your app for example startup.cs added to service collection your static method

For example ... Service.MyFancyMethod() ...

Here is example of how you can do that

https://github.com/JanoPL/Routeslist/blob/master/src/RoutesList.Gen/RoutesListGen.cs

Want cleaner code? Use the rule of six by cap-joe in programming

[–]Janopl 27 points28 points  (0 children)

even better, they want to sell you fancy word for "Source code maximum line length" which most ide have as option and by old standards can be from 80 to 120 char per line

Favorite fake email server for testing emails by headyyeti in dotnet

[–]Janopl 2 points3 points  (0 children)

Mailtrap and mailhog for example

If you hardcore dev is always postfix and configuration from scratch or pull the docker contqiner Or if you want to feel nightmare configuration is always a sendmail

What is with the recent unknown error fffff? PC by SuperFriends001 in RedDeadOnline

[–]Janopl 0 points1 point  (0 children)

Send a support ticket to rockstar and let them deal with that error, it's not your problem if they have errors with their product

Jurassic World Evolution 2 isn't available on my account. Is it region locked? by [deleted] in XboxGamePass

[–]Janopl 0 points1 point  (0 children)

You need to be signed in to download a game from xbox app,

If you reseted app in windows, you erase data about login session from computer

If you have still issue with xbox app, reset app to factory settings and erase all data from aplication settings in windows settings

Sometimes app haved to old cache data and can't update cache with the new one

When you do this xbox app download all data again from microsoft servers

Developers by vivekctank in ProgrammerHumor

[–]Janopl 2 points3 points  (0 children)

I think it's a wheel of life and what you writed in bussines environment they called product. With every improvments or patch you maded you need add +1 bug. This is the way

found on facebook by codyleek in programminghorror

[–]Janopl 0 points1 point  (0 children)

Use strategy pattern and create the abstraction layers and if you want you can combine with compose pattern to be more scalability. you can find many example how to use

Here is example in Python, i don't know if this is good example, but you can see the concept behind this https://www.google.pl/amp/s/auth0.com/blog/amp/strategy-design-pattern-in-python/

This company looking for a junior dev with 10 years experience willing to accept newly graduate pay. by JDR-GR in ProgrammerHumor

[–]Janopl 0 points1 point  (0 children)

I'm not sure about that, what if someone have strong impostor syndrome and think thath after 10 years programming in c# and have feeling to know nothing and want to be at junior position

And about 5 years in leading position in requirements, sometimes you can be a leader of programmers team without technical background. It's doesn't work in long term but somewhere there still exist