Auto redacting feature in MPLAB X



  • Some of you may be familiar with MPLAB X. Microchip decided to abandon their own software and transition to something floating on top of Netbeans. I found an "undocumented feature" to automatically redact your open .c project:

    [url=http://postimage.org/image/mlwjhhvwz/][img]http://s13.postimage.org/mlwjhhvwz/MPLABX_anon.jpg[/img][/url]

    (I redacted the name of the project, all the other stuff was automagical)



  • The real WTF is that they would screw around with MPLAB. Or maybe I'm wrong... you tell me. I've still got my head in the sand with respect to MPLAB X.

    You're fortunate that someone else with a brain decided to log in today... most of the regulars here don't have the balls for embedded development.



  • Looks like bold barcode font. Awesome!



  • I get something similar in VS2008, but only on one line at a time - the line I'm currently editing.
    The broken font's not as cool though - I just get 'unknown char' boxes.



  • Looks like the Window menu is too important to be messed with.

    Also the search box and the insertion mode indicator. among other things.



  • Arggh! Open braces are on the same line as the statement! My eyes are bleeding!



  • @Mole said:

    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Who gives a goddamn shit.



  • @dhromed said:

    Who gives a goddamn shit.

    I like your style!



  • @Mole said:

    @dhromed said:
    Who gives a goddamn shit.

    I like your style!

    It's TDWTF forums-style, at its best!



  • @Mole said:

    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!
    how do you know they are braces?



  • Zoom in, you can clearly see
    "while (1) {"
    even though the font is yoda (or something similar)

    Or at least I can :-)



  • @Mole said:

    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.



  • @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

     

    I kind of prefer the other style, but I completely agree that the key is for the project to stick to a single style.



  • @Mole said:

    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!
     

    The redacting is working quite well if the only complaint you have about my code is my style (or lack thereof) in postioning of open braces.

     



  • I've seen this happen in various applications, but never found out why. The font you're seeing is Small Fonts, which is obviously not intended for that point size.



  • @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

     

    Yeah, you just get used to it.



  • @Mole said:

    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!
    Compact Control Readability, biatch.



  • @dhromed said:

    @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

    Yeah, you just get used to it.

    God this debate is fucking retarded.

    1) Get an IDE with code formatting

    2) Use it to auto-format however you like while working on the file

    3) Then use it to auto-format back to the "standard" before checking it in

    4) Never discuss this stupid, pointless, already-solved-for-years debate in a forum ever again



  • @blakeyrat said:

    @dhromed said:

    @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

    Yeah, you just get used to it.

    God this debate is fucking retarded.

    1) Get an IDE with code formatting

    2) Use it to auto-format however you like while working on the file

    3) Then use it to auto-format back to the "standard" before checking it in

    4) Never discuss this stupid, pointless, already-solved-for-years debate in a forum ever again

    Blakey, you know as well as I that 90% of Software Engineering is complaining about and/or reinventing things that have already been solved. If we didn't waste time on pointless, antagonistic holy wars, then we'd be a real profession that produced quality products instead of a clusterfuck of superstition and cargo cultism that doesn't deserve to use the name "engineering".



  • @morbiuswilters said:

    a real profession that produced quality products instead of a clusterfuck of superstition and cargo cultism
    Does that even exist?



  • @Zecc said:

    @morbiuswilters said:

    a real profession that produced quality products instead of a clusterfuck of superstition and cargo cultism
    Does that even exist?

    The homeopathic remedies I buy seem well-made.



  • @blakeyrat said:

    God this debate is fucking retarded.
    I agree, but wouldn't it be great if code just had one, single format that everyone used? And you just know that the format should be that the brace should be on a line by itself :)

    I've tried code formatters, but they just don't seem to work. Always adjusting parts of the code that I don't want adjusted.

    Then of course you have people who have different values for the indenting, and some who use space characters and others which use tabs. Arghh!



  • @Mole said:

    I've tried code formatters, but they just don't seem to work. Always adjusting parts of the code that I don't want adjusted.

    That must be a really broken formatter.

    @Mole said:

    Then of course you have people who have different values for the indenting, and some who use space characters and others which use tabs. Arghh!

    Pretty easy to configure and solve with coding standards. However, we really should be using smart tabs.



  • @morbiuswilters said:

    Pretty easy to configure and solve with coding standards. However, we really should be using smart tabs.

    Ah, but tabs not only encode more useful information in fewer bytes and display correctly in non-code-focused text editors, but also allow each developer to set up the display exactly how they like it without impacting other developers. They're vastly superior in every way to spaces, which explains why open source projects always use spaces as the standard.



  • @blakeyrat said:

    They're vastly superior in every way to spaces, which explains why open source projects always use spaces as the standard.
    I recently worked with some code that used a mixture of tabs and spaces - the best I can figure out is that somebody used mcedit, set the tab width to 6 and enabled fake half-tabs (which results in the editor pretending the tabs are 3 spaces wide, and using that as padding where the number of tabs isn't even). I'd really like to know why that option even exists.



  • @blakeyrat said:

    @morbiuswilters said:
    Pretty easy to configure and solve with coding standards. However, we really should be using smart tabs.

    Ah, but tabs not only encode more useful information in fewer bytes and display correctly in non-code-focused text editors, but also allow each developer to set up the display exactly how they like it without impacting other developers. They're vastly superior in every way to spaces, which explains why open source projects always use spaces as the standard.

    I agree that tabs make more sense (and that using spaces for indention is stupid, which may be why FOSS projects do it so often). That's why I mentioned smart tabs: tabs for indention, spaces for any alignment later in the line (for example, building a table in comments). Tabs don't work as well for alignment if people configure their own space values for display tabs; the alignment breaks then.



  • @dhromed said:

    @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

     

    Yeah, you just get used to it.

    Everything on its own line, and no bloody space characters!

    public
    class
    foo
    {
    public
    void
    bar
    (
    )
    ;
    }



  • @TheCPUWizard said:

    Everything on its own line, and no bloody space characters!
    How do you feel about tabs?



  • @blakeyrat said:

    @dhromed said:

    @morbiuswilters said:

    @Mole said:
    Arggh! Open braces are on the same line as the statement! My eyes are bleeding!

    Personally, I much prefer braces on the same line, but I'm perfectly capable of working with either. All I ask is that a project pick one and stick with it.

    Yeah, you just get used to it.

    God this debate is fucking retarded.

    1) Get an IDE with code formatting

    2) Use it to auto-format however you like while working on the file

    3) Then use it to auto-format back to the "standard" before checking it in

    4) Never discuss this stupid, pointless, already-solved-for-years debate in a forum ever again

     

     

    NOT A WTF - This is normal in embedded software 

     


  • ♿ (Parody)

    @Helix said:

    NOT A WTF - This is normal in embedded software

    How do you save your source code without a filesystem?



  • @boomzilla said:

    @Helix said:
    NOT A WTF - This is normal in embedded software

    How do you save your source code without a filesystem?

     

    NOT A WTF - This is normal in embedded software development



  • @boomzilla said:

    @Helix said:
    NOT A WTF - This is normal in embedded software

    How do you save your source code without a filesystem?

    It's saved in a VCS.

     

     

     

    And before you ask, the VCS is stored in a database.


  • ♿ (Parody)

    @Zecc said:

    And before you ask, the VCS is stored in a database.

    And it's databases, all the way down, right?



  • @boomzilla said:

    @Zecc said:
    And before you ask, the VCS is stored in a database.

    And it's databases, all the way down, right?

     

    Any reason the database "file" couldn't be something like /dev/sdb2?


Log in to reply