mostyfriedman's Profile User Rating: *****

Reputation: 724 Enlightened
Group:
Expert w/DIC++
Active Posts:
4,470 (2.23 per day)
Joined:
24-October 08
Profile Views:
58,597
Last Active:
User is offline Yesterday, 12:14 AM
Currently:
Offline

Previous Fields

Country:
EG
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Chevrolet
Dream Kudos:
625
Expert In:
Learning

Latest Visitors

Icon   mostyfriedman knows nothing about anything

Posts I've Made

  1. In Topic: 10 Programming Languages You Should Learn

    Posted 19 Mar 2014

    View PostSkydiver, on 19 March 2014 - 06:12 AM, said:

    As I stare at that code (and trying to envision how my defragger will work), I've come to the realization that is not quicksort. Quicksort is supposed to sort in place and a pivot is supposed to be picked out. What I'm seeing there is that new memory is being allocated and I can't for the life of me see where the pivot is being chosen (other than just grabbing the first number to be the pivot). For my defragger, that would mean that I would need more memory than I have diskspace...


    That was just a very simple implementation of sorting a list in Haskell, it's easy for newcomers to understand and write. If you want "true" quicksort, it'll look pretty similar to its imperative counterpart.

    xclite's description of what the code does is correct.
  2. In Topic: 10 Programming Languages You Should Learn

    Posted 17 Mar 2014

    Quote

    You mean Edsgar Dijkstra? I didn't know he ever advocated FP.

    Yes, see here.

    Quote

    I've noticed that the term "elegant", in both math and programming, generally indicates something which has been rigorously golfed down to its minimal-length expression, with no concern for readability. When I see the term "elegant" I usually expect to read something which makes perfect sense to someone who already understands it perfectly, but which communicates nothing to a reader coming to it fresh. That is, it's usually a piece of writing that shouldn't have happened, since it's perfectly useless.


    That's totally fine, it depends on how you define elegance.


    Quote

    Computers are wonderfully, frustratingly, linear. Imperative languages are how a computer thinks. You can take a simple C program and go one to one to assembly and then machine instructions. For computer science, you must understand this.

    Functional programming is a level of abstraction intended to allow the human to think of the problem in a different way. Unfortunately, the computer will still keep on chewing one instruction at a time, regardless of the language those instructions started in.

    And, when you have to debug, guess which paradigm is the most transparent.


    That is very true, but because of that we need to build abstractions that make our lives easier. I believe FP is one such abstraction. I have written and debugged both functional and imperative programs, and definitely debugging a higher level program is much easier.
  3. In Topic: 10 Programming Languages You Should Learn

    Posted 17 Mar 2014

    I totally agree, but in my experience FP can teach one a lot of great things that will make you a better programmer, even if you don't actually use FP in your job. If you want to know what I am talking about, read Structure and Interpretation of Computer Programs. It uses Scheme, and it's available to read online for free. The video lectures are also available on the book's website.
  4. In Topic: 10 Programming Languages You Should Learn

    Posted 17 Mar 2014

    Indeed, I am in the minority. Few people had a problem with switching from a functional language to an imperative language in their curricula. Dijkstra was one of those people, and he was quite upset when they had to switch from Haskell to Java, I think. I also think that a lot of people see functional programs as unnatural because they most probably started with an imperative language and stuck with it long enough that it became "natural" to them. At least that was the case with me. After spending some time with FP though, I started seeing how much more elegant it was.
  5. In Topic: 10 Programming Languages You Should Learn

    Posted 17 Mar 2014

    View Postmodi123_1, on 17 March 2014 - 09:15 PM, said:

    I am pretty sure if you are doing a quicksort in any language the natural language rendition of what you are doing would be about the same.


    I really disagree with that. It is true that it eventually does the same thing, but if you try to describe what every part of the code does to a student, it can be confusing. Anyways, I agree with Jon that we can all just agree to disagree. It's obvious that we're all biased. So let's just leave it at that.

My Information

Member Title:
The Algorithmi
Age:
25 years old
Birthday:
April 15, 1989
Gender:
Location:
Cairo, Egypt
Interests:
Analysis and design of Algorithms
Theory Of Computation
Recursion
recreational mathematics
functional programming
Artificial Intelligence
Full Name:
Mostafa Hany El Sayed
Years Programming:
4
Programming Languages:
Java, Python, Ruby, Prolog, Haskell (learning), common lisp, C/C++, MySql, MSSQL, verilog hdl

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  mostyfriedman@gmail.com
Website URL:
Website URL  http://
Facebook:
https://www.facebook.com/MostyFriedman
Twitter:
Cryptogrammer

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    modi123_1 Icon

    17 Mar 2014 - 12:24
    What eve what eva.. I do what I want.
  2. Photo

    tarmizi_adam2005 Icon

    21 Feb 2014 - 07:03
    Ah ok, Hopefully, everything is fine there InsyaAllah.
  3. Photo

    tarmizi_adam2005 Icon

    19 Feb 2014 - 19:24
    Salamu'alaikum,
    How is it in Misr ? How is the new government there ? Heard a lot about Misr, but I guess I should ask someone who is really from Misr to really find out.
  4. Photo

    tarmizi_adam2005 Icon

    12 Jan 2014 - 03:53
    Salamu'alaikum
  5. Photo

    BenignDesign Icon

    27 Sep 2013 - 06:59
    Hey.
  6. Photo

    no2pencil Icon

    21 Nov 2011 - 21:04
    Wow, have not seen you in a while?! Things good?
  7. Photo

    Martyr2 Icon

    01 Feb 2011 - 23:06
    Sounds like Hosni Mubarak may step down now. I hope he keeps his word. But you can never trust a dictator! :)
  8. Photo

    red_4900 Icon

    01 Feb 2011 - 01:45
    Seriously dude, don't go back to Egypt right now. It's a mess.
  9. Photo

    absynthe Icon

    28 Jan 2011 - 22:18
    I hope you are safe my friend! I'm thinking of you and hoping all is well! Don't pick up any rocks please..
  10. Photo

    Dogstopper Icon

    03 Jan 2011 - 00:15
    Hope you had a good New Year's day Mosty!
  11. Photo

    skyhawk133 Icon

    31 Dec 2010 - 13:59
    You too man! Hope 2011 is a good year for you! Glad to have you here at DIC.
  12. Photo

    Alex6788 Icon

    15 Nov 2010 - 23:07
    Hey mostyfriedman
  13. Photo

    Bent al-Yemen Icon

    19 Aug 2010 - 02:07
    looool, i don't know , i just got used to do so.
  14. Photo

    megglz Icon

    11 Aug 2010 - 05:21
    probably!
  15. Photo

    absynthe Icon

    11 Aug 2010 - 05:17
    whats up sexy? :)
  • (2 Pages)
  • +
  • 1
  • 2