The PokéCommunity Forums Off-Topic Discussions Internet & Technology
The Coder's Lounge

Internet & Technology Here's where we nerd out about the world wide web and all forms of technology!

Reply
 
Thread Tools
  #176    
Old April 25th, 2018 (4:27 AM).
Seliph's Avatar
Seliph Seliph is offline
Lord
 
Join Date: Feb 2013
Gender: Male
Posts: 2,641
The way how Delphi handles interfaces has got to be the weirdest and stupidest way that I've ever seen.

Basically, when you want to implement an interface, you automatically subscribe to implement three specific methods as well, whose only purpose is to keep track of the weird reference counting those interfaces do. From what I understand that's also the reason why in Delphi you can specify multiple interfaces alongside a class the implementing class inherits from. Delphi by itself is only single-inheritance.

Looking at different tutorials, the way people get around that issue is deriving the class from a class called TInterfacedObject whose only purpose is to implement those three methods. However, if you do that, since Delphi is only single inheritance, you lose out on the ability to derive from another class. So, if you don't want that you end up copying them anyway.
__________________
Reply With Quote
  #177    
Old April 29th, 2018 (1:24 AM).
Zemanahrad's Avatar
Zemanahrad Zemanahrad is offline
 
Join Date: Apr 2013
Location: Czech Republic
Age: 21
Gender: Male
Nature: Relaxed
Posts: 2,104
Do you guys have any experience with Java Applets? I was tasked with making educational interactive materials for kids about basic data structures. And because I was working pretty much only in Java for the last year I was thinking about using it for this.

Also, I wanted to make real life example for each structure. I was thinking about comparing queue to the queue in the school cafeteria, but I don't know what I should compare to stack. Do you have any ideas?
__________________
Reply With Quote
  #178    
Old April 29th, 2018 (10:09 PM).
Ganondorf's Avatar
Ganondorf Ganondorf is offline
 
Join Date: May 2009
Posts: 215
Quote:
Originally Posted by Zemanahrad View Post
Do you guys have any experience with Java Applets? I was tasked with making educational interactive materials for kids about basic data structures. And because I was working pretty much only in Java for the last year I was thinking about using it for this.

Also, I wanted to make real life example for each structure. I was thinking about comparing queue to the queue in the school cafeteria, but I don't know what I should compare to stack. Do you have any ideas?
I haven't tried Java applets yet, actually. I'm trying to kinda stay away from Java as it's slowly dying at least in my eyes.

As for data structures, a good reference for a queue is probably some kind of line for service, so a school cafeteria is probably a good bet. For a stack, the most common comparison is a stack of identical plates. When you want to pop/retrieve data from your stack, you're taking a single plate off the top of the stack to use it. When you're pushing/adding data to the stack, you're putting a clean plate on the stack to use later.
__________________
My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

I coveted that wind, I suppose.

Moderator of Internet & Technology - Signature Image
Reply With Quote
  #179    
Old May 8th, 2018 (3:02 AM).
Alexander Nicholi's Avatar
Alexander Nicholi Alexander Nicholi is offline
We come close to find Singularity
 
Join Date: Nov 2009
Location: Jakarta, Indonesia
Age: 20
Nature: Adamant
Posts: 5,393
I’ve been working on the build tool for our game engine, ÔÇô, writing both the tool and the engine itself in D.

It takes a stacked solution/project approach that’s similar to Visual Studio, but the solution is headed by a small INI file that contains Git URLs along with some metadata. Those repos get cloned and have their own project INIs along with their sources, which are compiled together and linked statically into a single executable.

The engine isn’t purely D, though: C and C++ source code are important to have in some cases. The build tool uses the LLVM toolchain to produce D code as well as C and C++, and with the LLD linker it can perform link-time optimisation across both file and language boundaries. Since everything’s bundled statically this should be great for optimisation. It also means building on *nix and Windows happens with the same tools.

The build tool will also (eventually) help facilitate development and release cycles, which I wrote about here. My deadline for a functioning build tool and engine stub is at the end of May, but with how much progress I’ve made so far I might be able to start working on these things afterward, too!
__________________
the beat goes on (ノ^o^;)ノ
ヽ(;^o^ヽ) the beat goes on
the beat goes on (ノ^o^;)ノ
ヽ(;^o^ヽ) the beat goes on
( don’t stop the groovin’ )
Reply With Quote
  #180    
Old May 19th, 2018 (7:59 AM).
Ganondorf's Avatar
Ganondorf Ganondorf is offline
 
Join Date: May 2009
Posts: 215
I managed to pull 70% on my project in my programming class and I'm pretty happy about it. I have a strange suspicion that it might also be one of, if not the, highest mark in the class. :x
__________________
My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

I coveted that wind, I suppose.

Moderator of Internet & Technology - Signature Image
Reply With Quote
  #181    
Old June 29th, 2018 (4:18 AM).
Seliph's Avatar
Seliph Seliph is offline
Lord
 
Join Date: Feb 2013
Gender: Male
Posts: 2,641
It sure is something special when you come back from school to work and get assigned to write an algorithm for water flow analysis and you realize that your math skills have degraded more than you'd like to.

Well, I know what I'll be doing the next few days, or weeks, or months or how long it may take. :laugh-squinted:
__________________
Reply With Quote
  #182    
Old July 15th, 2018 (11:25 AM).
Ganondorf's Avatar
Ganondorf Ganondorf is offline
 
Join Date: May 2009
Posts: 215
Well, decided to continue working on my blog software again. Added password hashing and avatar support, so it's a step forward.

Spoiler:
__________________
My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

I coveted that wind, I suppose.

Moderator of Internet & Technology - Signature Image
Reply With Quote
  #183    
Old July 16th, 2018 (11:14 PM).
AlolanRattata AlolanRattata is offline
The Music Meister
     
    Join Date: Jun 2018
    Posts: 4
    Quote:
    Originally Posted by Danny0317 View Post
    Add me to the list. I'm Danny and I'm pretty good at Java and C#. FBI is top bae.
    I am interested in learning and am currently studying coding. Java and Javascript are separate things, correct?

    I am also aware of Python and PHP, and the website script HTML. I hope this thread can help in furthering my education.
    Reply With Quote
      #184    
    Old July 18th, 2018 (2:47 AM).
    Seliph's Avatar
    Seliph Seliph is offline
    Lord
     
    Join Date: Feb 2013
    Gender: Male
    Posts: 2,641
    I'm currently busy porting stuff from Delphi 7 over to Delphi 10.2. Sometimes you really have to ask yourself what they were thinking when they decided to introduce some of those "features".
    Quote:
    Originally Posted by AlolanRattata View Post
    I am interested in learning and am currently studying coding. Java and Javascript are separate things, correct?
    They are completely different. JavaScript is a Scripting Language used primarily for web development whereas Java is more of a general purpose language, aimed for software projects, that claims to be crossplatform.
    __________________
    Reply With Quote
      #185    
    Old 2 Weeks Ago (3:39 PM). Edited 2 Weeks Ago by Inkblots.
    Inkblots's Avatar
    Inkblots Inkblots is online now
       
      Join Date: Sep 2012
      Location: Canada
      Age: 28
      Gender: Female
      Nature: Calm
      Posts: 263
      I'm invoking the "if I have to look at it everybody else has to look at it" rule:

      Code:
      while ( (name[c++] = ch = fgetc(load)) != '~');
      That's right, no body, all the instructions are in the condition statement.

      As part of an assignment we have to refactor (in groups of 6 - 7) a piece of open-source software that works but is badly written/designed (picked out and assigned to us by the prof/TAs). I'm 97 lines into my 230 line section of code and this is the most baffling thing I've seen so far though somehow not by much. (other gems include breaks everywhere, variables with names that tell you nothing and are declared randomly as needed except for where they were declared as global variables in god knows which file, hard-coded values that should have been defined as constants so I'm not spending 10 minutes wondering why a counter variable has inexplicably been started at 8, an 'else' statement that was 40 lines long and badly indented, and exactly zero comments)

      In my 28 years I have never had even the slightest desire to drink but I'm pretty sure this code is going to change that.
      Reply With Quote
        #186    
      Old 2 Weeks Ago (1:11 PM).
      bobandbill's Avatar
      bobandbill bobandbill is online now
      Which is which?
       
      Join Date: Mar 2008
      Location: A cape
      Gender: Male
      Nature: Jolly
      Posts: 13,793
      Quote:
      Originally Posted by Inkblots View Post
      I'm invoking the "if I have to look at it everybody else has to look at it" rule:

      Code:
      while ( (name[c++] = ch = fgetc(load)) != '~');
      That's right, no body, all the instructions are in the condition statement.

      As part of an assignment we have to refactor (in groups of 6 - 7) a piece of open-source software that works but is badly written/designed (picked out and assigned to us by the prof/TAs). I'm 97 lines into my 230 line section of code and this is the most baffling thing I've seen so far though somehow not by much. (other gems include breaks everywhere, variables with names that tell you nothing and are declared randomly as needed except for where they were declared as global variables in god knows which file, hard-coded values that should have been defined as constants so I'm not spending 10 minutes wondering why a counter variable has inexplicably been started at 8, an 'else' statement that was 40 lines long and badly indented, and exactly zero comments)

      In my 28 years I have never had even the slightest desire to drink but I'm pretty sure this code is going to change that.
      Oh dear. I guess it's a different way to teach you to embrace good coding habits...?
      __________________
      Reply With Quote
        #187    
      Old 2 Weeks Ago (1:44 PM).
      Inkblots's Avatar
      Inkblots Inkblots is online now
         
        Join Date: Sep 2012
        Location: Canada
        Age: 28
        Gender: Female
        Nature: Calm
        Posts: 263
        Quote:
        Originally Posted by bobandbill View Post
        Oh dear. I guess it's a different way to teach you to embrace good coding habits...?
        Among other things lol. It's also to start teaching us how to work in larger groups, and how to, well, deal with and refactor bad code written by someone else (since in the workplace unless you're independent or working for a startup, you're not usually writing code from scratch). The program I'm in (software engineering) is more focused on "soft skills" and workplace preparation (teamwork, design/documentation, writing readable/maintainable code) vs the pure computer science degree which is more focused on technical skills (math/logic, machine language, hardware).
        Reply With Quote
          #188    
        Old 1 Week Ago (6:46 AM).
        Tsutarja's Avatar
        Tsutarja Tsutarja is online now
         
        Join Date: Mar 2010
        Location: Tampa, Florida
        Age: 23
        Gender: Male
        Nature: Jolly
        Posts: 23,145
        I'm learning through Java in one of my university classes now! Pretty interesting language, but too bad it's pretty much dead.
        __________________
        Reply With Quote
          #189    
        Old 1 Week Ago (2:36 PM).
        Inkblots's Avatar
        Inkblots Inkblots is online now
           
          Join Date: Sep 2012
          Location: Canada
          Age: 28
          Gender: Female
          Nature: Calm
          Posts: 263
          Quote:
          Originally Posted by Tsutarja View Post
          I'm learning through Java in one of my university classes now! Pretty interesting language, but too bad it's pretty much dead.
          I am as well, though it's actually just a general class on object-oriented programming that happens to use Java as the example language. It's taking me a while to wrap my head around it (after doing almost everything in C up to this point my brain really really wants to find somewhere to declare function prototypes, and it just feels wrong to be able to do stuff like remove something from an array without having to go and manually shift everything to fill in the empty space) but I'm really liking it.
          Reply With Quote
            #190    
          Old 1 Week Ago (12:57 PM).
          wakachamo wakachamo is offline
          -
           
          Join Date: Jun 2005
          Posts: 2,699
          Quote:
          Originally Posted by Tsutarja View Post
          I'm learning through Java in one of my university classes now! Pretty interesting language, but too bad it's pretty much dead.
          Java is 100% far from dead. :)
          __________________
          Paired with Forest Grovyle.
          Reply With Quote
            #191    
          Old 1 Week Ago (10:54 PM).
          Ganondorf's Avatar
          Ganondorf Ganondorf is offline
           
          Join Date: May 2009
          Posts: 215
          Quote:
          Originally Posted by wakachamo View Post
          Java is 100% far from dead. :)
          Personally speaking, I feel the only thing really keeping Java alive is Android. Java support in browsers is basically nonexistent now, and most applications don't really make use of it, they'd rather just target either exclusively Windows or OSX and use native libraries, unless they can do cross-platform without sacrificing quality or control. While I did learn it in school, it's really not the first language I'd go for, I'm hearing C# is one language that a lot of employers are looking for besides Python, C++, or Javascript, and as I once read, "C# is Java done right", and I'm inclined to agree having used both. Doing things in Java is a huge pain sometimes, but C# is just a memory-managed version of C++ with lots and lots of padding, compared to the likes of Java and the really absurd way some things are done, especially when it comes to syntax.
          __________________
          My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

          And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

          But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

          I coveted that wind, I suppose.

          Moderator of Internet & Technology - Signature Image
          Reply With Quote
            #192    
          Old 1 Day Ago (11:00 PM).
          wakachamo wakachamo is offline
          -
           
          Join Date: Jun 2005
          Posts: 2,699
          Quote:
          Originally Posted by Ganondorf View Post
          Personally speaking, I feel the only thing really keeping Java alive is Android. Java support in browsers is basically nonexistent now, and most applications don't really make use of it, they'd rather just target either exclusively Windows or OSX and use native libraries, unless they can do cross-platform without sacrificing quality or control. While I did learn it in school, it's really not the first language I'd go for, I'm hearing C# is one language that a lot of employers are looking for besides Python, C++, or Javascript, and as I once read, "C# is Java done right", and I'm inclined to agree having used both. Doing things in Java is a huge pain sometimes, but C# is just a memory-managed version of C++ with lots and lots of padding, compared to the likes of Java and the really absurd way some things are done, especially when it comes to syntax.
          You're only focusing on consumer apps, though. There are entire sectors of software engineering that don't live on your phone that have had monumental reliance on Java for many years and will continue to do so—from server-side search technologies to entire financial backends.

          Like it or not, Java's very, very far from dead. :)
          __________________
          Paired with Forest Grovyle.
          Reply With Quote
          Reply

          Quick Reply

          Join the conversation!

          Create an account to post a reply in this thread, participate in other discussions, and more!

          Create a PokéCommunity Account
          Thread Tools

          Posting Rules
          You may not post new threads
          You may not post replies
          You may not post attachments
          You may not edit your posts

          BB code is On
          Smilies are On
          [IMG] code is On
          HTML code is Off

          Forum Jump


          All times are GMT -8. The time now is 5:42 AM.