[ home ] [ pony / rp / canterlot / rules ] [ arch ]

/canterlot/ - Canterlot

Site related staff board
Name
Email
Subject
Comment
File
Flags  
Embed
Password (For file deletion.)

[Return][Go to bottom]

 No.1868

File: 1537997437682.gif (1.42 MB, 725x657, 725:657, 1117421__safe_solo_screenc….gif) ImgOps Google

I'm really curious what sort of spaghetti code is running this place.  I say that because on my own cgi web forum, I could always seem to implement changes within minutes/hours that seem to be monumental undertakings here.  Things like the SFW switch would literally take minutes to make.  So what sort of duct tape is holding this place together?  What's the main issue when it comes to site changes?  I'm not saying this to put down the devs, more that I want to understand what the hangups are.

 No.1869

>>1868
I think it's a modified version of TinyBoard/vichan.

>>1868
>Things like the SFW switch would literally take minutes to make.
Eh, maybe once the UI has been decided on.  And then just testing it on at least some of {Firefox,Chrome,Edge,Safari} and mobile takes some time.

 No.1870

>>1869  Is it the site code itself, or scripts running on top of it?
>Eh, maybe once the UI has been decided on
Again, two check boxes would take minutes to add, and control it via a cookie and a new database column.  I'm just having a hard time understanding the difficulty of changes in general.  

 No.1871

>>1868
Fuckin, I thought it was gonna be that easy too, but things are crazy under the hood (imo). For instance, I thought I'd just add a checkbox and add a column, but I found that image metadata is handled by a fuckin column that is just a massive json.

This is a row of the database:

          id: 405
      thread: 121
     subject: NULL
       email: NULL
        name: Anonymous
        trip: NULL
     capcode: NULL
        body: Uniquely deploy cross-unit benefits with wireless testing procedures. Collaboratively build backward-compatible relationships whereas tactical paradigms. Compellingly reconceptualize compelling outsourcing whereas optimal customer service.
body_nomarkup: Uniquely deploy cross-unit benefits with wireless testing procedures. Collaboratively build backward-compatible relationships whereas tactical paradigms. Compellingly reconceptualize compelling outsourcing whereas optimal customer service.
        time: 1527653880
        bump: 1527653880
       files: [{"name":"abcd7.png","type":"image\/png","tmp_name":"\/tmp\/phpX4ffAO","error":0,"size":973901,"filename":"abcd7.png","extension":"png","file_id":"1527653880430","file":"1527653880430.png","thumb":"1527653880430.png","is_an_image":true,"width":1382,"height":1448,"thumbwidth":220,"thumbheight":230,"file_path":"pony\/src\/1527653880430.png","thumb_path":"pony\/thumb\/1527653880430.png"}]
   num_files: 1
    filehash: 2a62150115942760ba9b6f788d6fc56c
    password: MX)t&I5u
          ip: I给
      sticky: 0
      locked: 0
        sage: 0
       embed: NULL
        slug: NULL
    vip_trip: NULL
         vip: 0

Where the files column controls everything to do with an image and how it is handled.

So if I wanted to get the effect I wanted, I'd have to either make some amalgamation where I add a column to do what I want in addition to that column or instead modify this json in some manner to fit with how the site was designed.

Also, the only experience I have in php, html, css, etc, etc is from working on this site. I literally have no idea how to put something in a cookie right now, because I haven't had to do that work on the site yet.

Also, also, I have been working insane hours at work and have barely been able to find time to work on the site at all. Even if I wanted to, I'm so burned out that I barely can produce at my actual job, let alone my volunteer job.

Also, also, also, I have an anxiety disorder and I worry and get really indecisive about how to handle site changes. Combine that with the fact I have no clue what I'm actually doing, makes it hard to make changes that are any bit complex. Maybe you'd just be like "throw it in a cookie, done" but that isn't really something I can do.

tl;dr:
> So what sort of duct tape is holding this place together?
Some kind that I'm not experienced enough to recognize

>What's the main issue when it comes to site changes?
I have literally no qualifications to be doing this job, but someone is better than no one.

>>1869
>Eh, maybe once the UI has been decided on.  And then just testing it on at least some of {Firefox,Chrome,Edge,Safari} and mobile takes some time.
Ha, I barely test anything before pushing it out, lol. If I'm generous I will test it on firefox and chrome desktop and mobile chrome. I guess, you get what you pay for :p

 No.1873

File: 1538041445990.jpg (280.34 KB, 1024x1024, 1:1, t3_5us79l.jpg) ImgOps Exif Google

>>1871
Holy cow, dude

Here are some chill doggos

 No.1874

File: 1538049541706.gif (790.97 KB, 500x553, 500:553, tumblr_orbhu7okBc1vajy96o1….gif) ImgOps Google

hahahaha so it seems more like when i was asking for a user filter earlier in this site's history the "no" answer was more because nobody knew what the fuck was going on under the hood to implement it

 No.1875

>>1871  I mean, it looks like a simple associative list, so that would seem like the easiest solution.

You wouldn't have to necessarily use a cookie, but basically just utilize the same system you're using in Options right now.

What is your programming background, exactly?

not trying to rag on you here, but it does seem to me like I have more experience with sites in general.

Is there a hard cap on the number of developers?  I feel like I could knock this stuff out - worst case scenario - via trial and error on test.ponyville.us

 No.1876

File: 1538052248822.png (473.87 KB, 640x768, 5:6, a3d51f0142b3376815ddea3b06….png) ImgOps Google

>>1875
It sounds like you're volunteering to implement this feature if it passes the vote?
:fluf6:
>>1875
>You wouldn't have to necessarily use a cookie, but basically just utilize the same system you're using in Options right now.
Oh yeah, this website doesn't use any cookies.  It uses
localStorage
instead.

 No.1877

>>1874
Huh, that sure is a strange conclusion to come to! Considering we've never had any issue getting things coded despite me learning how the site works along the way. It's almost like you don't know what you are taking about and are just being deliberately cruel to me or something! But you wouldn't do that would you?

No but really? What is your problem? I've never in my life done anything but try to be nice to you, and yet you take every opportunity you can find to piss on me. You used to be cool and chill and now you are just mean for the sake of it. You seriously need to reevaluate the person you want to be, because right now your persona is ugly as sin. Also, your words have less value than dirt to me, so don't bother responding unless it's with an apology, because I just don't care what comes out of the mouth of someone as venomous as you.

>>1875
>What is your programming background, exactly?
I do backend Java, with a focus on cryptography. I also know bash really well, lol. That's about it. Hell in college my major was a Comp Sci with a focus on game design, so I didn't even learn database in college.

>You wouldn't have to necessarily use a cookie, but basically just utilize the same system you're using in Options right now.
Yes, the options system, that's the easy part. Getting the site to do with the images what I want is easy once I have them marked up correctly so my Javascript can work on them. That's like, 10 minutes of effort.

>not trying to rag on you here, but it does seem to me like I have more experience with sites in general.
Lol, ya think? I'm not some all proud guy who cares who's the better dev. I'm very much out of my element, but that's okay because I'm learning new stuff too. My only real concern is that since I'm just winging it, I feel like I'm just causing more and more damage to the code base with my changes. So I try to think through what I need to do thoroughly and whether there is a better way before implementing it.

>Is there a hard cap on the number of developers?  I feel like I could knock this stuff out - worst case scenario - via trial and error on test.ponyville.us
I'm actually really the only active developer as it is. Zeke owns the report bot and handles that, but doesn't work on the site. Whoever else is listed as Dev are on break from it. So yeah, we have room for more devs. If you are looking for a position, ask Moony. If you want to just take a crack at seeing the site code and making changes, gimme your ssh pub key and I'll let you on my development site. I own and run it myself so I don't really need to ask permission to let someone use it.

That said, I have no problem with letting you on the team and even letting you outshine what I do. But it's not like I can't do this myself, I just have been too busy with work and life to put in the time. So, volunteer if you want to help and improve the site, not because it wouldn't be done otherwise.

 No.1878

>>1874
>hahahaha so it seems more like when i was asking for a user filter earlier in this site's history the "no" answer was more because nobody knew what the fuck was going on under the hood to implement it
Um, I think you missed the part where an implementation of the feature was literally posted in >>1523 but was rejected on policy grounds.  If you want the filter for yourself, just go install GreaseMonkey in your browser and set it to load that code for this website.

 No.1879

>>1868  I'm volunteering to mess around with it until I get it to work.
>Oh yeah, this website doesn't use any cookies.  It uses localStorage
From 2 minutes of google searching, it seems to operate in the exact same way as cookies, minus the expiration date.  so figuring out how to use it should be easy.
>>1877  I know SQL, apache, python, C(++), html, and css.  I'm ok with bash and cgi.  I don't know much java aside from what I've learned for task-specific web issues.  seems like a complementary skillset.
>That's like, 10 minutes of effort.
Is the rest of the effort just getting the markup to work?
>I'm not some all proud guy who cares who's the better dev. I'm very much out of my element, but that's okay because I'm learning new stuff too.
I mean, there's nothing wrong with that.  That's how I learned web stuff as well, over many years of trial and error.
>I feel like I'm just causing more and more damage to the code base with my changes.
That really shouldn't be the case, unless the code is spaghetti to begin with.
>So I try to think through what I need to do thoroughly and whether there is a better way before implementing it.
reasonable.  but maybe unnecessary.  Turning down a functional code that operates in 2ms because there's a pipedream code that operates in 1ms seems like a wasted opportunity to me.  It can always be optimized later.
>I'm actually really the only active developer as it is.
What happened to Foreground?  I'm honestly not even sure who that is.
>If you want to just take a crack at seeing the site code and making changes, gimme your ssh pub key and I'll let you on my development site. I own and run it myself so I don't really need to ask permission to let someone use it.
I'll have to generate a new one, but I'll definitely take you up on that.
>That said, I have no problem with letting you on the team and even letting you outshine what I do. But it's not like I can't do this myself, I just have been too busy with work and life to put in the time.
Like I said, not trying to rag on you.  call it curiosity if you like.  I haven't been actively coding for a bit, and as I look at this site, I can't help but think at the very least I might be able to help optimize some things.
>So, volunteer if you want to help and improve the site, not because it wouldn't be done otherwise.
fair enough.

 No.1880

>>1879
>Is the rest of the effort just getting the markup to work?
The effort is to find the right way to store the information in the database in a way that is expandable and not just a hack. Like maybe I will want to make more than just one kind of image tag in the future and I want to make the system not just work but be easy to modify. Like, it actually would be much easier if I just treated the NSFW flag as it's own little feature divorced from everything else, but I try to write code in a mindful way. Yeah, don't let perfect be the enemy of the good and all that, but I'm still not gonna just throw some crap together just cuz it works.

>That really shouldn't be the case, unless the code is spaghetti to begin with.
I dunno what good site code looks like since this is the only site I've worked on, but this thing looks like a mess. Coding the site feels like jenga to me.

>Turning down a functional code that operates in 2ms because there's a pipedream code that operates in 1ms seems like a wasted opportunity to me.  It can always be optimized later.
It's not like that. I just get picky about infrastructure changes, such as DB stuff, because after I code them, I have to live with them usually. I don't want to build some crap in that's too hard to refactor down the road (such as carelessly modifying the contents of the files column then having to script a tool to fix all the content of that column of I fuck it up and decide to change it).

>What happened to Foreground?  I'm honestly not even sure who that is.
Don't know him that well either. He was head dev when I joined, gave me access and tutored me a little, then vanished one day without a word. I had to wrestle control of all the dev operations into my own hands to be able to keep the site updating without him. He eventually just started showing up every once in a while in mod chat with opinions but I don't know if he intends to do any coding again.

>Like I said, not trying to rag on you.
Gaaaawd boat, stop ragging on me so much, you're just such a meanie :p

 No.1881

>>1880
>The effort is to find the right way to store the information in the database in a way that is expandable and not just a hack.
Creating database columns and manipulating them should be literally the easiest and most efficient thing.  I'm still not seeing the problem, and I'm just scratching my head at this.  Unless you're trying to store a bunch of variables as a condensed boolean, in which case you need to plan it out a bit, this doesn't make logical sense to me.  Even if that were your intention, the savings from doing this would be nonexistent since very little is being done client-side (at least, I should hope not).
>Like maybe I will want to make more than just one kind of image tag in the future and I want to make the system not just work but be easy to modify.
Columns are easy to modify!  and if they're not, then the db system is the problem.
>(such as carelessly modifying the contents of the files column then having to script a tool to fix all the content of that column of I fuck it up and decide to change it)
the files column doesn't make sense, on any level.  It literally shouldn't exist except to point to the file itself.  It's bad db design.  If every post has one and only one image, and every image has these same characteristics, and since null entries do not bloat the db (or they shouldn't, assuming the db is half decent), then every one of these entries should be its own column, optimized for whatever type of information is being stored.  yet another reason I say I suspect spaghetti.  and also
>Coding the site feels like jenga to me.
like you said.
>Gaaaawd boat, stop ragging on me so much, you're just such a meanie :p
I'll accept my ban now.  :fluf1:

 No.1882

File: 1538101257467.jpg (335.39 KB, 650x900, 13:18, 1459220923989.jpg) ImgOps Exif Google

>>1880
>Like maybe I will want to make more than just one kind of image tag in the future and I want to make the system not just work but be easy to modify. Like, it actually would be much easier if I just treated the NSFW flag as it's own little feature divorced from everything else, but I try to write code in a mindful way.
Well, the most maintainable solution is to simply create a new column for the NSFW flag.  If you want to create a new type of image tag later, you can create a new column for it.  Trying to anticipate a scheme of combining the tags into one column is just premature optimization at this point.  

And that
files
column is a nasty hack.  If I were you, I wouldn't touch it unless I absolutely had to.

 No.1883

>>1882
>>1881
Lol, you're both all like 'just make a new column'! Maybe I should! I just haven't thought it through yet! It's not like I have rejected that as an option, just that I also haven't rejected all the other possibilities yet either.

Making a new column was my first instinct too, then I saw how the site was actually handling the current spoiler tag and it fuckin broke my brain it was so weird and messy. So I've just been thinking about whether it is better to follow the original plan or try to do things within the framework that the site is designed around. There are consequences to just doing things the way that are easiest, I have a responsibility towards anyone else who is gonna maintain this code in the future too. Having the site work in a consistent (if not entirely logical manner) holds value too.

>>1881
>the files column doesn't make sense, on any level.  It literally shouldn't exist except to point to the file itself.  It's bad db design.  If every post has one and only one image, and every image has these same characteristics, and since null entries do not bloat the db (or they shouldn't, assuming the db is half decent), then every one of these entries should be its own column, optimized for whatever type of information is being stored.  yet another reason I say I suspect spaghetti.
It probably is! Lol, go make an ssh key and find out for yourself and come back and tell me that the site code is crazy as fuck. Because sometimes I feel like tearing out my hair when I see things like this files column.

 No.1884

>>1883
No seriously, the other night I was telling the rest of staff, I even told Noonim, that I was just gonna knock out this thing in one night and be done with it. Just throw up a column and add some options and done. Then I actually looked at the crazy ass convoluted site code for how the spoiler tag works, and I just closed everything and walked away, lol.

 No.1885

>>1883
>I just haven't thought it through yet!
You're overthinking things. :dash8: Just add the column and be done with it. :aj4:

>>1883
> the original plan or try to do things within the framework that the site is designed around
I doubt there was ever a plan or framework w.r.t. that files column.  More like the developer just thought "there's a bunch of data here and it's too tedious to create a separate column for each of them, so I'll just JSON-encode the whole lot and shove it in a single column, lol". :dash3:

 No.1886

>>1885
>You're overthinking things.
That's the understatement of the year! It's not like I make it a secret that I have an anxiety disorder, lol. Doesn't just apply to social situations. You'd be surprised by how difficult it can be for me to make simple decisions. So while I appreciate your enthusiasm, I literally have no choice but to take this at my own pace (or let boat do it, cuz then it'd be his fault if it went to shit!)

 No.1887

>>1886  I will be taking you up on your offer, though probably not until mid/late October assuming that's ok.  I had something come up yesterday, on top of other obligations, and so I will need to deal with those first.

 No.1888

>>1887
Cool, no problem. Just let me know when you are ready.

 No.1928

File: 1539011302880.png (130.85 KB, 401x433, 401:433, happy shy 3.png) ImgOps Google

hi boat! if you're still around, i'd love to talk to you about developing for the site.

 No.1937

>>1928
>waits to hear back from you  :fluf2:

 No.1942

File: 1539920461074.png (11.06 KB, 680x226, 340:113, gitpull.png) ImgOps Google

Here, this was the effort required to make the change for the SFW Switch. Took about 6 lazy dev hours (i.e. part of the time spent was faffing about). I ended up going with just adding a column for nsfw, because anything else seemed like madness. I pretty much could not have made it happen with any fewer changes that this.

 No.1943

>>1942  interesting.  what were the quick reply deletions?

 No.1944

>>1943
It was doing crazy things to get the Spoiler Image checkbox to right align on the same line as the file selector of quick reply panel. Considering I dropped the checkboxes under the file selector, I didn't need that madness anymore.


[]
[Return] [Go to top]
[ home ] [ pony / rp / canterlot / rules ] [ arch ]