Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "winapi"
assignment: use winAPI to create a "virus" that put itself in autorun and does nothing.
me, a curious student: does the assignment and adds a heap corruption code just as a joke.
after sending the assignment to the teacher I realized that I have sent the real virus.
result: teacher comes next lesson without a computer and stares at me silently and viciously.
we'll see what happens next
any idea on what's going on in his head?36
Damn fuck it. I am making a program with
Accessing the Win32 API in c is such a pain. Just made a simple window with 70 lines of c code. And I have to edit it in turbo c but run it in some other compiler. Our teacher is a .... uhhh
Sorry if the rant doesn't make sense. I am too tired.11
There are no words could describe the feelings when I wanted a documentation about WinAPI structure then I found this on MSDN3
So I'm working on a Gnome shell extension. Which is a nice integration wtih Todoist. It's far from done but it's starting to shape up.
From all projects and things I've done, this is a pain. There is almost no documentation so I'm almost entirely reliant on source codes of other extensions.
And yeah, stackoverflow isn't going to help you...
Fun project nevertheless :) Reminds me of the time I worked in WINAPI.9
I'm working as a tutor for two classes. Students are 11th graders, smart and curious as hell.
We get to the OS part of the course and they have to use WinAPI for now. The explanations in the lessons are vague and they are forced to use MSDN which also has either super-high-level or super-simplistic explanations. Don't know how to give them motivation for this crap.
Also, where is WinAPI really used? For writing drivers? Viruses? Relatively low-level software?3
How old were you guys when you started writing code? What language and what inspired you?
My first programming memories come from writing some QBasic text-based RPG and graphics demos when I was like 12. I remember moving into C/C++ soon after with Borland's C++ compiler and playing around with WinAPI and OpenGL 1.16
QTCreator, cause it fucking works.
GCC, cause it fucking works unlike others.
zsh/bash, better than any other.
Sublime Text, being awesome while not murdering my PC or having DPI issues *cough* Atom.
Linux kernel, cause it doesn't fucking bluescreen when using strtok().
SSH, remote controlling a PC has never been so enjoyable.
Git, cause otherwise my version control would be a mess.
SDL2, cause the following two are cancer: X and winAPI.
GNU coreutils, it just works.
ArchLinux/Debian, it works for me okay? don't judge (but still pacman > apt)
valgrind and gdb, cause I can be an idiot sometimes.
nano > vim > emacs. fight me
C/C++, portable enough whilst not being shit.
Win 7, shutting up people about how the creators update broke everything.
PS Well, I know I went offtopic but these are my true opinions about software/programs I deal on a daily basis.6
so I started a side project a while ago.
the only thing it could do was to create some files with desired names and extensions. so this was basically a pretty simple editor.
I left this project with no future plans for a month or so until I started working on it again this week. I added comments to the editor, a console user interface.
the ui isn't futuristic. the program runs in the console. it just lists all the files and folders where the program is currently located in. in the beginning it could take user input and that input was the location where the files created in the editor would be saved. then I thought: it would be more interesting if I created a folder in which I saved the files from the editor. so I did this thing.
then I thought, again: hey, this console is pretty boring and stuff. why should I add some special commands? and so I did.
now you can create an empty folder, before you created a folder and saved at the same time the files created in the editor. now you can open another folder in which you can do the same stuff as before. you can get the current location of the folder you are currently in, so you don't get lost in your fancy computer. you can delete a folder completely, set color, reset color.
but one thing that I lost almost ONE FREAKING HOUR ON IT TO MAKE THE USER EXPERIENCE BETTER was the following: when creating a folder, either empty or with the files from the editor, the program automatically opens the folder, not in the console(hey, I didn't thought of that) but in the file explorer from the os. now it only works for windows and windows explorer because I used system(const char*). I know it's not portable or efficient but I just wanted things to work, I will optimise it later.
the thing that made me lose that one hour debugging was figuring out how to open that file.
ok, so I used windows api with GetCurrentDirectory, I knew how to use system, I knew how to form the path that would match up with the folder, I almost knew how to open the folder with system().
the problem was that I had the path complete, but if the folder had white spaces system() wouldn't recognise the freaking command!
so the string with the path would also contain the command used in system() and I would just .c_str() the string so it could work. as an example my wrong way to make the path was this:
can you figure out what is the problem?
it's just so trivial.
how cannot you figure it out?
of course you NEED to put "explorer" between the start command and the actual path!
pffft, you idiot! so easy to figure it out.
so yeah, the right way to open a folder is like this:
"start explorer C:\\path to heLL!!"
p.s.: I still don't understand why putting explorer works and without it doesn't. without explorer it just just says that path with the first word before the white space doesn't exist.
First time linux user feedback
Linux lovers are probably gonna eat me alive but I don't give a flying fuck
Maybe its a little lenghty or boring, tell me what you think
I work for game extension company. We work with WinAPI and such. I've been using Windows since forever and I'm happy with it. But I thought to myself "hey, if I wanna be a good dev, I should give Linux and OS X a try, too"
I downloaded Linux Mint couple of months ago to start with. I was unable to boot it from live CD no matter what I tried, even in recovery mode. Apparently, Mint 18.3 was based on Ubuntu 16.04 which doesnt support UEFI
Wait, what the fuck, all modern PCs have UEFI so what, do all Mint users have 10 y/o laptops and PCs???
Anyway, when I heard about Mint 19 being released I thought to give it another try and I did. What a surprise, it booted successfully from Live CD. I saw the Linux desktop for the first time in my life, yay! I then installed it, GRUB appeared, my Windows was still there and wasn't broken so I was happy SOMETHING was working. I configured timeshift and applied dvorak layout system-wide. Realised dvorak layout is fucked up big time and applied normal layout for just desktop environment. Everything was really nice until couple reboots later Cinnamon stopped launching (kept returning to login screen). Okay, lets use timeshift
First big what-the-fuck was when I found out system restore can only be done using GUI??? This is absolutely retarded and I couldn't believe it is true. Login screen has a reachable console but I can't login there since I can't type the password. Fuck, fuck, fucking drovak layout was there.
Recovery mode - I've spent 20 minutes trying to type "timeshift --restore" having to press all keyboard buttons just to progress with one button. I've had another what-the-fuck when I saw "error: can't restore timeshift - partition already mounted"
Okay, this is too much. Why the fuck would you bundle a recovery mode if you can't restore a snapshot from there.
I have spent 3 hours now googling and trying to remove this fucking keyboard layout. No dice. I am making another copy of the live CD now. I'm gonna reinstall the whole shit now. I have the desire to create a custom Mint version without this abomination of a keyboard layout.
It's okay. Windows has taught me to be patient.
Fuck Dvorak, I dont know who the guy is but his keyboard layout can eat my dick12