• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:22
CET 03:22
KST 11:22
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA13
StarCraft 2
General
SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3: RO16 results & RO8 bracket RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t GM / Master map hacker and general hacking and cheating thread
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
Data analysis on 70 million replays soO on: FanTaSy's Potential Return to StarCraft BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET [Megathread] Daily Proleagues Small VOD Thread 2.0
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Path of Exile Clair Obscur - Expedition 33 Stormgate/Frost Giant Megathread EVE Corporation [Game] Osu!
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1847 users

The Big Programming Thread - Page 1010

Forum Index > General Forum
Post a Reply
Prev 1 1008 1009 1010 1011 1012 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
September 18 2019 11:57 GMT
#20181
Speaking of OP. I think this should be added there for Ruby: https://www.poodr.com/

Amazing book in general.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
September 18 2019 12:58 GMT
#20182
I'd put it in but the site isn't loading for me so eh?
Liquipediaasante sana squash banana
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
September 18 2019 13:05 GMT
#20183
On September 18 2019 21:58 tofucake wrote:
I'd put it in but the site isn't loading for me so eh?


Tested and it is working for me.
I'll always be your shadow and veil your eyes from states of ain soph aur.
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
September 18 2019 13:40 GMT
#20184
Yeah basically as soon as I posted that it loaded. Whatever.
Liquipediaasante sana squash banana
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
September 18 2019 13:46 GMT
#20185
On September 18 2019 22:40 tofucake wrote:
Yeah basically as soon as I posted that it loaded. Whatever.


Complaining about things not working should be officially supported troubleshooting steps.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-09-23 14:20:54
September 23 2019 14:19 GMT
#20186
So i started making my first webpage. I am using python3 (DJANGO) right now i am wondering what should i use for frontend. Bootstrap?? I will add i have almost none experience in regards to web development, the only thing i did that is somehow connected is automation with selenium so i will have to learn everything from scrap.

What do You guys recommend?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
Last Edited: 2019-09-24 09:45:32
September 24 2019 06:37 GMT
#20187
On September 23 2019 23:19 Silvanel wrote:
So i started making my first webpage. I am using python3 (DJANGO) right now i am wondering what should i use for frontend. Bootstrap?? I will add i have almost none experience in regards to web development, the only thing i did that is somehow connected is automation with selenium so i will have to learn everything from scrap.

What do You guys recommend?


This will get you through the basics:
https://www.obeythetestinggoat.com/pages/book.html#toc

Bootstrap and JQuery will be fine to begin with. Later on you'll want to figure out how to not do a full stack but rather a back-end API in Python and front-end in React if you want to be more versatile (I have started with front-end, moved on to full-stack and now I only ever do back-end and never want to touch front again).

Starting with full-stack and simple stuff like Bootstrap and JQuery will give you a nice overview of the basics so it'll be much easier to grasp other concepts later down the line.

The biggest challenge with web-dev is that you need to cross a lot of boundaries. You need to know how the web works, know HTML, CSS, JS, most likely SQL (please don't use MySQL, go with PostgreSQL), language of choice for the back-end (PHP, Java, Ruby, Python, etc.) and on top of that you'll probably need to know how to set up a Linux server in some capacity.

When you grasp the basics you then learn about automated deployment cycles with test pipeline, learn about Docker, various async messaging systems (Kafka, RabbitMQ), numerous authentication and encryption schemes and what not.

It's not easy to get started so begin with small and simple things or you'll get overwhelmed and drown.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
September 24 2019 10:43 GMT
#20188
There is nothing wrong with mysql. I personally prefer it to postgres
Liquipediaasante sana squash banana
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
September 24 2019 10:49 GMT
#20189
Thanks for answer, right now my aim is to just finish my little personal side project, plus be able to handle maintenace of our test report database at work. In both places this is just a sideline thing, not major by part by any means but it is nice to learn new things.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
September 25 2019 08:53 GMT
#20190
On September 24 2019 19:43 tofucake wrote:
There is nothing wrong with mysql. I personally prefer it to postgres


But why? Everything is worse in mysql. It has fewer data types, some truly wonky stuff (I don't remember if they fixed NULL = NULL for uniqueness purposes etc.) and is in general just a worse db in my opinion.

In the modern days, where you tend to use a lot of JSON postgres is superb with its special data types for json and ability to create indices for json internal properties. Bloody brilliant.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
September 25 2019 12:42 GMT
#20191
MySQL has JSON: https://dev.mysql.com/doc/refman/5.7/en/json.html

And plenty others. Part of it is that it's the first SQL I learned, but I've been working with a lot of postgres, redshift, and TSQL recently and I find them frustratingly annoying in the little things, like why can't I use double quotes for strings like in every other language? Why is double quotes a column? Why are square brackets also column? Why are there more options for defining column than there are for defining value?
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
Last Edited: 2019-09-26 11:01:15
September 26 2019 11:00 GMT
#20192
Since I've been mostly just removing code instead of writing code at work for the past months (removed ~40k lines of code recently) I went back to doing some MUD coding on the side.

Now I'll get to work with oldschool LPC code from 1998. This'll be fun.
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-10-02 12:53:06
October 02 2019 12:52 GMT
#20193
So i am working at my website and i need to answer philosophical question (i am using DJANGO).

I want to render a table with ~60 rows, each row with 4 fields one of which will be various kinds of input fields and rest are just text. Texts are unique in each row. INput fields types vary by row.
Now the question is how to do that in efficient and elegant way (The options i see):
a)I can render each row separetly in .html file, but that seems very ugly and time consuming
b)Load from model.py via forms.py but i am not really sure how to that correctly --> one model with those rows as fields? But in DJANGO Input fields (Char or Integer) do not support adding user defined fields with that, so i do not know how to add that text data i need--> other then overridding all Input fields type i would use (do not seem elegant at all). I guess i can store my text data in some dictionary/list and load from it but that doesnt look nice...
c)Load without forms.py as intermediary directly from models.py (but i am not really sure how to do that, didnt find such use case in any tutorial.
d) Other options???

So my question is how to do that properly? Where should i hold the text data corespodning to Input fields? What are the best practices/my options?
Pathetic Greta hater.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-10-02 20:17:19
October 02 2019 20:14 GMT
#20194
Or more specific, i have some data that i want to render on page, thats mostly text data (like 60 rows of unique text). And models in DJANGO are working in a way that each field is supossed to represent a field in database. But i dont want to store that text in database. Were do i put this text data (other then .html itself) so i can loop over those 60 rows in convinient fashion if not in a model?

Normally i would just define a list somewhere and loop over it but how do i access that list in .html file?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
Last Edited: 2019-10-03 01:33:03
October 03 2019 01:32 GMT
#20195
You can generate stuff in html.


<h1>Table</h1>

<table>
{% for obj in obj_list %}
<tr class="whatever">
<td>{{ obj.val }}</td>
<td>{{ obj.other_val }}</td>
</tr>
{% endfor %}
</table>
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-10-03 07:00:42
October 03 2019 06:48 GMT
#20196
I know that. But i have hard time retriving the data. Right now i am using CreateView class and acessing my model fields trough "form.field". See my code below.

models.py

class ShipSystems(Ship):
def __init__(self, *args, **kwargs):
super(ShipSystems, self).__init__(*args, **kwargs)

thrust = models.PositiveIntegerField(default=0, max_length=2)
advanced_thrust = models.PositiveIntegerField(default=0, max_length=2)
ftl_drive = models.BooleanField()
screens = models.PositiveIntegerField(default=0)
armor = models.PositiveIntegerField(default=0)
fire_control = models.PositiveIntegerField(default=0)
shield_generators = models.PositiveIntegerField(default=0)


views.py

class CVShipSystems(CreateView):
template_name = 'fading_thrust/ship_systems_form.html'
model = ShipSystems
fields = ['thrust', 'advanced_thrust', 'ftl_drive', 'screens', 'armor', 'fire_control', 'shield_generators']



ship_systems_form.html

{% extends "fading_thrust/home.html" %}
{% block title %}Fading Thrust{% endblock title %}

{% block content %}
<div class="pb-2 mt-4 mb-2 border-bottom">
<h3>Ship systems</h3>
</div>
<div class="table-responsive table-sm table-striped">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>System name</th>
<th>Selection</th>
<th>Mass</th>
<th>Points</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Standard drive</td>
<td>{{ form.thrust }}</td>
<td>5 % of total mass per point of thrust</td>
<td>1 point per point of mass</td>
<td>Half of thrust can be spent on turning</td>
</tr>
</tbody>
</table>
</div>

<button type="submit" class="btn btn-primary">Save</button>
{% endblock content %}


And this works and renders just fine. The problem i have is how do i pass text or other data to ship_systems_form.html ??? What tags should i use???? I tried numerous tags and always got the result that page rendered but field was empty (it looks if it doesnt find a tag and just skips it and renders rest of page).
I also tried usuing ListView class but with similiar results. So maybe i am making some basic mistake....i also never saw
 obj_list 
mentioned but i did try
 object_list 
(and it didnt work) when i tried to call
 object_list.thrust 
or
 ShipSystems.thrust 
or something similiar. What tag should work in Your opinion?
Pathetic Greta hater.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-10-05 19:23:40
October 05 2019 19:01 GMT
#20197
Nevermind. I am an idiot
Pathetic Greta hater.
SC-Shield
Profile Joined December 2018
Bulgaria832 Posts
October 06 2019 10:46 GMT
#20198
Just out of curiosity, how long do you stay at company on average?
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-10-07 07:13:09
October 07 2019 07:10 GMT
#20199
I am into my fifth year working at the same company, doing basicly the same stuff the whole time(automotive embedded - testing/test automation). Its starting to wear on me, so i am considering switching. Hence learning new technologies etc.

Ohh, i will also add that for all those years i am doing stuff for the same customer. The projectes i worked for are named: NTG5, NTG6, NTG7, NTG7 RSU. Go figure.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
October 08 2019 14:03 GMT
#20200
On October 06 2019 19:46 SC-Shield wrote:
Just out of curiosity, how long do you stay at company on average?


It's 6 to 24 months for me, so the average would be about 15 months
Time is precious. Waste it wisely.
Prev 1 1008 1009 1010 1011 1012 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 5h 8m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 130
ProTech24
StarCraft: Brood War
Calm 3627
NaDa 74
Noble 33
ivOry 21
Dota 2
PGG 256
NeuroSwarm112
Heroes of the Storm
Khaldor138
Other Games
summit1g13136
RotterdaM92
ViBE61
Trikslyr56
Organizations
Other Games
gamesdonequick864
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• Hupsaiya 105
• musti20045 28
• Airneanach13
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• Azhi_Dahaki10
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21524
League of Legends
• Rush469
Other Games
• Scarra1408
• imaqtpie754
Upcoming Events
RSL Revival
5h 8m
Classic vs SHIN
Maru vs TBD
herO vs TBD
Wardi Open
11h 38m
IPSL
17h 38m
StRyKeR vs OldBoy
Sziky vs Tarson
BSL 21
17h 38m
StRyKeR vs Artosis
OyAji vs KameZerg
OSC
20h 38m
OSC
1d 6h
Monday Night Weeklies
1d 14h
OSC
1d 20h
Wardi Open
2 days
Replay Cast
3 days
[ Show More ]
Wardi Open
3 days
Tenacious Turtle Tussle
3 days
The PondCast
4 days
Replay Cast
4 days
LAN Event
5 days
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-21
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.