Open comments for this post
why are we only using I in loops?
its a real question why only I ? I used f it was so cool.
Use other letters for your loops. I’m onto something guys, it’s the next big thing.
P.S: I’m going to take a break from coding in C since its pretty anoying and im not really doing anything while working maybe this challenge is really too hard for me.
I’m maybe going to start another project then see.
Open comments for this post
Brain cells aren’t connecting
I’m super tired and my brain cells aren’t working right.
sticker by fancy void
Open comments for this post
FINISHED COMPRESSOR.C
Finnaly finished compressor.c after 7 hours on it!
How did it did it ?
Well i used AI… Yes I’m not proud but hey its finished!
I was really tired and I just vibe coded it but now no more AI for decompressor.c !
Did i learn something?
Yes i didn’t blindly ask AI do give answers i asked to help debug the code!
What do i do next?
Probably sleep, I’m so tired.
Open comments for this post
Building huffman code tree
Finally finished coding everything but the tree.
I can finally code without AI
so for relearning, i authorized myself to use AI but only to debug, now i can finally not use it (since i relearned C)
Problems
I ran into several problems:
- Segmentation problems, i was accessing things i normally can’t
- Future problem, i can’t name something with more than two carrecters so when i’m merging two nodes i can’t rename thoses.
Open comments for this post
FINALLY FIXED SEGMENTATION PROBLEMS
For context i was building the compressor and i had segmentation problems
What is a segmentation problem?
A segmentation problem is when you try and access memory your don’t have access.
What was the problems?
- First the allocation, i didnt allocate for the array of pointers to my struct.
- Didnt check for NULL, so my arrays have 256 nodes (for all of the ASCII values) and i was trying to access values that just didnt existed.
How did i fix it?
I used AI to debug my code, I didnt directly asked for the awnsers, i asked it to help me without giving out awnsers. AI was very useful since i mad alot of small mistakes since i didnt program in C for a long time.
Open comments for this post
CS50x C Refresher
Redid one exercise from CS50x Psets 2, 3, 4, and 5.
I wanted to refresh my C programming skills because after Week 5 the course shifts more toward web applications, databases, and other topics. This was a good way to get back into writing C before continuing work on Stardance.
Open comments for this post
CS50x C Refresher
Redid one exercise from CS50x Psets 2, 3, 4, and 5.
I wanted to refresh my C programming skills because after Week 5 the course shifts more toward web applications, databases, and other topics. This was a good way to get back into writing C before continuing work on Stardance.
Open comments for this post
Studying Huffman Coding
Huffman Coding is a lossless compression algorithm.
Example text: ffffcdabdfdeeebcc
First, count how often each character appears:
f:4 c:3 d:3 e:3 b:2 a:1
Then repeatedly merge the least frequent characters into a binary tree until one final tree remains.
Each character gets a binary code:
More frequent characters receive shorter codes, reducing the total file size.
A key rule: no code can start with another code.
If f = 1, then 100 cannot be another character, so decoding stays unambiguous.
Time complexity: O(n log n)
Image: GeeksforGeeks
Video: Computerphile – Huffman Coding
Open comments for this post
Studying Huffman Coding
Huffman Coding is a lossless compression algorithm.
Example text: ffffcdabdfdeeebcc
First, count how often each character appears:
f:4 c:3 d:3 e:3 b:2 a:1
Then repeatedly merge the least frequent characters into a binary tree until one final tree remains.
Each character gets a binary code:
More frequent characters receive shorter codes, reducing the total file size.
A key rule: no code can start with another code.
If f = 1, then 100 cannot be another character, so decoding stays unambiguous.
Time complexity: O(n log n)
Image: GeeksforGeeks
Video: Computerphile – Huffman Coding
Open comments for this post
Finshed designing micropad it took 10h+ but i wasnt recording with hackatime/lapse.
it was very fun and refreshing since i was only coding for almost 6 months.
I’m very exsited to get the parts to build it!
Open comments for this post
Finshed designing micropad it took 10h+ but i wasnt recording with hackatime/lapse.
it was very fun and refreshing since i was only coding for almost 6 months.
I’m very exsited to get the parts to build it!