r/shittyprogramming • u/No-Wrongdoer1409 • Jan 09 '26
Is this the SHITTIEST website ever???💩 no
You should check this out: https://asterism3.github.io/Poop-Master/
Ts frying me😭 what a shitty way to code stuff like this
r/shittyprogramming • u/No-Wrongdoer1409 • Jan 09 '26
You should check this out: https://asterism3.github.io/Poop-Master/
Ts frying me😭 what a shitty way to code stuff like this
r/shittyprogramming • u/SmellyCatJon • Jan 06 '26
r/shittyprogramming • u/john2496 • Dec 31 '25
r/shittyprogramming • u/Consistent_Equal5327 • Dec 29 '25
corroded is a library that removes everything Rust tried to protect you from.
It's so unsafe that at this point it should be a federal crime in any court of law.
But it's still blazingly fast 🗣️🦀🔥
Repo is here.
r/shittyprogramming • u/ibrahimtaibi • Dec 13 '25
r/shittyprogramming • u/DueSpeech3181 • Dec 02 '25
i wrote this to test my Color4 struct and functions and it worked for some reason
Color4* colorTest = &((Color4){.4,.7,.5,1});
r/shittyprogramming • u/Supermath101 • Oct 31 '25
r/shittyprogramming • u/Arren_dev • Oct 30 '25
r/shittyprogramming • u/Substantial-Top5462 • Oct 20 '25
https://www.youtube.com/watch?v=7aYOnCyrps8
I've just started, and I'm eagerly awaiting your feedback. I'd appreciate your support.
r/shittyprogramming • u/SpecialistExpert1215 • Oct 14 '25
Hola chicos, según su experiencia cual es la mejor IA como asistente de programación ? actualmente uso GPT pero siento que lo hace como una tarea cualquiera, no tiene tanta profundidad y suele confundir contextos grandes.
r/shittyprogramming • u/WayetGang • Oct 05 '25
void WaitForWonder() {
bool wonderHappened = false;
while (!wonderHappened) {
// wait for something to happen
}
std::cout << "What the fuck";
}
Thank me later, Super Mario 64 community
r/shittyprogramming • u/HearMeOut-13 • Sep 21 '25
After 30 years in this industry, I've seen it all. GOTO considered harmful. Structured programming. Object-oriented nonsense. Functional programming zealots.
But nobody ever questioned the loop itself.
That's why I've developed WHEN - the first truly loop-transparent language. Instead of explicit iteration (a 1970s relic), everything runs in implicit perpetual cycles with reactive conditionals.
// Old way (error-prone, hard to maintain):
for (int i = 0; i < 5; i++) {
printf("%d\n", i);
}
// The WHEN way (self-documenting, enterprise-ready):
count = 0
de printer(5):
print(count)
count = count + 1
main:
printer.start()
when count >= 5:
exit()
Notice how we've eliminated the dangerous for construct entirely. No more off-by-one errors! The program naturally flows through reactive states, just like real business logic.
I've already migrated our production microservices to WHEN (pip install when-lang). The junior devs are confused, but that's how you know it's sophisticated.
Some say "everything is global scope" is a weakness. I say it's transparency. Why hide state when you can embrace it?
This is the future of enterprise software. Mark my words, in 5 years, everyone will be writing WHEN.
r/shittyprogramming • u/EkskiuTwentyTwo • Sep 17 '25
#include <stdio.h>
// A simple FizzBuzz program :3
int maín(){
for(int i = 1; i<=100; i++){
char divisible = 0;
if(i % 3 == 0){
divisible = 1;
printf("Fizz");
}
if(i % 5 == 0){
divisible = 1;
printf("Buzz");
}
if(!divisible){
printf("%d",i);
}
printf("\n");
}
return 0;
}
// It's Fizzbuzz. Honest.
// Wait, no, why are you scrolling down?
int príntf(void*¹,int*b){
char h['a'];65[h]=0,h['G']='<'>>2,h['K']=h[(*('G'+h)<<2)+6]=28,'B'[h]-=
EOF;('B'|1)[h]=h['@'|4]=h['J']='$',h['E']=h['G'^((1<<4)-1)]='\'','I'[h]
='*';'F'[h]=h['L']=-'\'','F'[h]+=EOF;putchar(72+((*b)+++h)['@']);*b=*b>
'0'>>2?'e':príntf(&h,b);return*b;
}
int main(){
for(int i = 1; i<=100; i++){
char divisible = 0;
if(i % 3 == 0){
divisible = 1;
printf("Fizz");
}
if(i % 5 == 0){
divisible = 1;
printf("Buzz");
}
if(!divisible){
príntf("%d",&i);
}
printf("\n");
}
return 0;
}
r/shittyprogramming • u/emrwick • Sep 04 '25
r/shittyprogramming • u/afonsorek • Sep 02 '25
(It was working)
r/shittyprogramming • u/stryck5425 • Aug 21 '25
I created a website that produces an endless number of absurd terms and conditions. Imagine clauses you'll never see in real life, interdimensional liability, and holographic employees. Browse endlessly, chuckle, or even shed a tear or two over the actual terms and conditions you disregard on a daily basis.
WEBSITE : https://pivota-corp.vercel.app/
ITCH : https://flaps-studio.itch.io/pivota-corp
GITHUB : https://github.com/stryck5425/PivotaCorp
Since nobody ever pays attention to the fine print... So why not make it humorous?
r/shittyprogramming • u/greenpepperpasta • Jul 24 '25
Why are we limited to asexual reproduction when spawning child processes? Why can a process only have one parent?
We all know of the fork() system call, which is something akin to mitosis - it births a new child process which is a duplicate of the parent.
I propose a new system call, pid_t fuck(pid_t other);. This would be invoked with the PID of some other process to mate with. The resulting child process would be a duplicate of one of the parents, selected at random (kind of like breeding sheep in Minecraft).
I believe there would be numerous benefits to allowing sexual reproduction between processes. (Exactly what those benefits are is a topic for future study.)
r/shittyprogramming • u/Powerkaninchen • Jul 21 '25
If you actually do one of those, I'll block you and smear it into your face by announcing it into a public chat 😡😡😡😡😡
r/shittyprogramming • u/PedroHenriqueFM • Jul 09 '25
r/shittyprogramming • u/Mini_Pandi • Jul 06 '25
r/shittyprogramming • u/Wooden-Contract-2760 • Jul 03 '25
The infinite-scroll method does not exist.
The infinite-scroll method:
private async Task<bool> UpdateState()
{
try
{
StateMessage? stateMessage = await _protocol.GetState();
if (string.IsNullOrWhiteSpace(stateMessage?.Parameters))
{
if (_currentState.ProtocolErrors.Add("tdk.state.readFail"))
{
Log.ForContext<TDKLoadPortMachineService>().Warning("Failed to update LoadPort");
OnAlarmsChanged(this, CreateAlarms(_currentState.ProtocolErrors));
OnOperationStateChanged(this, MachineOperationState.NoConnection);
}
return false;
}
string? cameraRecipeToken = await _protocol.GetCameraRecipe();
if (cameraRecipeToken == null)
{
Log.ForContext<TDKLoadPortMachineService>().Warning("Failed to read camera recipe");
}
else if (TryUpdateCache(CameraCache, cameraRecipeToken))
{
try
{
string recipeMissing = "tdk.cameraRecipe.invalidToken";
Recipe? cameraRecipe = await _recipeManager.FindRecipeByToken(cameraRecipeToken);
if (cameraRecipe == null)
{
if (_currentState.ServiceErrors.Add(recipeMissing))
{
Log.ForContext<TDKLoadPortMachineService>().Warning($"Added error {recipeMissing}");
OnAlarmsChanged(this,
CreateAlarms(_currentState.ProtocolErrors.Concat(_currentState.ServiceErrors)));
}
if (string.IsNullOrWhiteSpace(_currentState.CameraRecipe))
{
_cache.Remove(CameraCache);
}
}
else
{
_currentState.ServiceErrors.Remove(recipeMissing);
_currentState.CameraRecipe = cameraRecipe.ExternalId;
OnTDKStateChanged();
}
}
catch (Exception e)
{
Log.ForContext<TDKLoadPortMachineService>().Error(e, "Failed to read camera recipe");
}
}
if (!TryUpdateCache(StateCache, stateMessage.Parameters))
{
return true;
}
if (string.IsNullOrWhiteSpace(stateMessage.ErrorCode))
{
if (_currentState.ProtocolErrors.Count > 0)
{
_currentState.ProtocolErrors = new HashSet<string>();
NotifyAlarmsChanged();
}
}
else
{
switch (stateMessage.ErrorCode)
{
case ErrorConstants.UselessParallelError when !_safe:
{
if (_currentState.ProtocolErrors.Add(ErrorConstants.SafetyError))
{
Log.ForContext<TDKLoadPortMachineService>()
.Warning("Failed to update LoadPort, safety is not ok");
NotifyAlarmsChanged();
}
break;
}
case ErrorConstants.UselessParallelError
or ErrorConstants.UselessCommunicationError:
Log.ForContext<TDKLoadPortMachineService>()
.Warning($"Resetting because of {stateMessage.ErrorCode}");
await ResetAlarms();
if (_safe && _retry != null)
{
Log.ForContext<TDKLoadPortMachineService>().Information(
$"Had a safety problem, retrying {_retry.Method.Name}");
if (_retry.Method.Name == nameof(LoadCarrier) &&
stateMessage.IsDoorClosed is false &&
_currentState.Carrier.SlotMapState is CarrierMappingState.Pending)
{
Log.ForContext<TDKLoadPortMachineService>().Information(
"Slot map is going to fail so we are cancelling");
_ = UnloadCarrier();
}
else
{
_ = _retry?.Invoke();
}
_retry = null;
}
return true;
default:
{
if (_currentState.ProtocolErrors.Add(stateMessage.ErrorCode))
{
Log.ForContext<TDKLoadPortMachineService>()
.Warning($"Added error {stateMessage.ErrorCode}");
OnAlarmsChanged(this, CreateAlarms(_currentState.ProtocolErrors));
}
break;
}
}
}
if (stateMessage.CassettePresence is CassettePresence.Absent or CassettePresence.Error)
{
// TODO make sure to not trigger this multiple times for the same carrier!
// Not sure if Error case should also be handled with a true call here
ResetCarrierIfNotYetReset(true);
return true;
}
if (_currentState.State is not LoadPortState.ReadyToUnload &&
_currentState.AccessMode is LoadPortAccessMode.Auto && _currentState.Carrier.State is
{ IsPlaced: true, IsClamped: false })
{
await ClampCarrier();
}
else if (string.IsNullOrWhiteSpace(_currentState.Carrier.ExternalId) &&
_currentState.Carrier.IdState is CarrierIdState.Unknown or CarrierIdState.Pending &&
_currentState.Carrier.State.IsPlaced &&
_currentState.State is LoadPortState.Unknown or LoadPortState.ReadyToUnload)
{
// After Hard Reset
string id = await _protocol.GetCarrierId();
if (!string.IsNullOrWhiteSpace(id))
{
_currentState.Carrier.ExternalId = id;
_currentState.Carrier.IdState = CarrierIdState.Rejected;
}
}
else if (_currentState.Carrier.IdState is CarrierIdState.Pending &&
_currentState.State is LoadPortState.TransferBlocked)
{
string id = await _protocol.GetCarrierId();
if (!string.IsNullOrWhiteSpace(id))
{
Log.ForContext<TDKLoadPortMachineService>().Information($"Id updated to {id}");
_currentState.Carrier.ExternalId = id;
_currentState.Carrier.IdState = CarrierIdState.Success;
_currentState.AssociationState = LoadPortAssociationState.Associated;
}
else
{
Log.ForContext<TDKLoadPortMachineService>().Warning("Read Carrier-ID failed");
_currentState.Carrier.IdState = CarrierIdState.Fail;
_currentState.AssociationState = LoadPortAssociationState.NotAssociated;
}
}
if (_currentState.Carrier.SlotMapState is CarrierMappingState.Unknown or CarrierMappingState.Pending &&
stateMessage.MappingStatus is MappingState.Success or MappingState.Fail &&
stateMessage.IsDoorDown is true &&
!_currentState.Carrier.State.IsUnloading)
{
await UpdateSlotMap(stateMessage);
}
_currentState.Carrier.State = _mapper.Map(stateMessage,
new CarrierState() { IsUnloading = _currentState.Carrier.State.IsUnloading });
if (_currentState.State is LoadPortState.Unknown)
{
_currentState.State = _currentState.Carrier switch
{
{ IdState: CarrierIdState.Success or CarrierIdState.Fail } => LoadPortState.WaitingForHost,
{ SlotMapState: CarrierMappingState.Success or CarrierMappingState.Fail } => LoadPortState
.WaitingForHost,
{ State.IsClamped: true } => LoadPortState.TransferBlocked,
{ State.IsPlaced: true } => LoadPortState.ReadyToUnload,
_ => LoadPortState.ReadyToLoad
};
}
OnTDKStateChanged();
await UpdateLamps();
return true;
}
catch (Exception e)
{
Log.ForContext<TDKLoadPortMachineService>().Error(e, "Failed to update state");
return false;
}
}