How Do I Think Logically When Programming?

Upload and start working with your PDF documents.
No downloads required

How To Write on PDF Online?

Upload & Edit Your PDF Document
Save, Download, Print, and Share
Sign & Make It Legally Binding

How do I think logically when programming? I have folders that contain mp4, text, pdf, doc, mp3 files and I would like to separate them. I can write Ruby code, but it’s the logic that kills me. I've worked on this problem for 3 weeks.

I think you have a good start, but you have to remember that computers are idiots. Think about giving these directions to an idiot and imagine what will happen. Try to follow your own steps by hand. If you need to keep track of something in a variable, specify the variable name so you can use it later. Think about what kinds of things could go wrong, and what you would do if that happened. Ask the user where to look for files. (What can go wrong here? Can t specify a directory like your root directory? Are there any kinds of files in the directory that you're going to disallow?) Sort by file extension. (Sort what? From where? Just specify a little more. You don't really want to sort, though, you want to group. Should .PDF and .pdf be considered the same? (If you're on a Windows system, t'd probably better be. If you're on Unix, maybe not.) Are there things that can go wrong here?) Ask where to save. (What can go wrong here?) Display organized folders. (It sounds to me like you missed a step. Your idiot who gets the directions asked where to save, because you told him to. There are no organized folders. Why would there be when you haven't done anything with the files? What is it you're doing with the files? Moving them? Copying them? Again, what can go wrong here? What if the folders already exist? What if the files already exist? Should the folder t're copying to already exist or not? What should the target directories be named? If *.mp3 files should go in the mp3 folder, what did you decide about PDF vs. pdf?)

Customers love our service for intuitive functionality

4.5

satisfied

46 votes

Write on PDF: All You Need to Know

What is the goal of this task? (If you had a complete understanding of this section, you would have no problem answering this question. Just pick one. It could be as trivial as “Sort and save files”. You're the idiot answering to, so you might as well pick something easy.) Tell the user how it works. (If you didn't get this question right, then you know that you can get some pretty bad answers in this section.) When you think you're ready, say that the task is complete. (If no tasks are completed in this tutorial, just go write some more for now.) Let's go back to this file list. The next step is to get this list, from which we can look through the files you created. Ask the user where he or she can find this list. (What do I mean by this? You did the wrong thing.

What Our Customers Say

Deborah W.
Deborah W.
I corrected a mistake in my form and replaced it with the right information. It took a few minutes only! Thanks a lot!
James S.
James S.
The process of PDF correction has never been so easy. I’ve managed to create a new document faster than ever before!
William G.
William G.
It was really easy to fill out my PDF document and add a signature to it! This is a great service! I recommend it to you!
Denis B.
Denis B.
I edited the document with my mobile phone. It was fast and, as a result, I’ve got a professional-looking document.

Supporting Forms

Submit important papers on the go with the number one online document management solution. Use our web-based app to edit your PDFs without effort. We provide our customers with an array of up-to-date tools accessible from any Internet-connected device. Upload your PDF document to the editor. Browse for a file on your device or add it from an online location. Insert text, images, fillable fields, add or remove pages, sign your PDFs electronically, all without leaving your desk.